Ejemplo n.º 1
0
// address: 8049ac0
void proc3(char *param1, FILE *param2, char param3[], char param4[], char param5[], __size32 param6) {
    proc5(param1, param2, param3, param4, param5, &param6);
    return;
}
Ejemplo n.º 2
0
// address: 0x4014ec
void _start() {
    __size16 ax; 		// r0
    __size16 cx; 		// r1
    unsigned char dl; 		// r10
    __size32 eax; 		// r24
    __size32 *ebp; 		// r29
    __size32 ebx; 		// r27
    __size32 ecx; 		// r25
    __size32 edi; 		// r31
    int edx; 		// r26
    __size32 esi; 		// r30
    int esp; 		// r28
    void *esp_1; 		// r28{8}
    void *esp_2; 		// r28{44}
    void *esp_3; 		// r28{191}
    int local0; 		// m[esp - 4]
    int local1; 		// m[esp - 24]
    int local2; 		// m[esp - 20]
    unsigned int local3; 		// m[esp - 12]
    int local4; 		// m[esp - 8]
    void *local5; 		// esp_3{191}

    esi = proc1(local1, local2, esi); /* Warning: also results in ebx, edi */
    esp_1 = proc2(16, ebx, esi, edi); /* Warning: also results in ebp */
    local5 = esp_1;
    ebx = 0;
    *(__size32*)(ebp - 4) = 0;
    eax = *24;
    esi = *(eax + 4);
    *(__size32*)(ebp - 28) = 0;
    edi = 0x403374;
    for(;;) {
        esp_3 = local5;
        *(__size32*)(esp_3 - 4) = 0;
        *(__size32*)(esp_3 - 8) = esi;
        *(__size32*)(esp_3 - 12) = 0x403374;
        eax = InterlockedCompareExchange(); /* Warning: also results in edx */
        if (eax == 0) {
            goto L24;
        }
        if (eax == esi) {
            break;
        }
        *(__size32*)(esp_3 - 16) = 1000;
        esp_2 = Sleep(*(esp_3 - 16));
        local5 = esp_2;
    }
    *(__size32*)(ebp - 28) = 1;
L24:
    esi = 1;
    if (global61 != 1) {
        if (global61 != 0) {
            global68 = 1;
L16:
            if (global61 == 1) {
                *(__size32*)(esp_3 - 16) = 0x4020cc;
                *(__size32*)(esp_3 - 20) = 0x4020c4;
                edx = _initterm();
                global61 = 2;
            }
            if (*(ebp - 28) == 0) {
                *(__size32*)(esp_3 - 16) = 0;
                *(__size32*)(esp_3 - 20) = 0x403374;
                edx = InterlockedExchange(*(esp_3 - 20), *(esp_3 - 16));
            }
            esp = esp_3 - 12;
            if (*0x403380 != 0) {
                *(__size32*)(esp_3 - 16) = 0x403380;
                eax = proc5(*(esp_3 - 16), dl, edx, 0); /* Warning: also results in ax, cx, dl, edx */
                ecx = *(esp_3 - 16);
                esp = esp_3 - 12;
                if (eax != 0) {
                    *(__size32*)(esp_3 - 16) = 0;
                    *(__size32*)(esp_3 - 20) = 2;
                    *(__size32*)(esp_3 - 24) = 0;
                    (*global53)(local1, local2, pc, 0x4021d8, 16, ax, cx, dl, eax, ecx, edx, 0, ebp, 1, 0x403374, LOGICALFLAGS32(eax), LOGICALFLAGS32(eax), LOGICALFLAGS32(eax));
                }
            }
            *(__size32*)0x23cc = global75;
            local0 = global75;
            local4 = global76;
            local3 = global77;
            eax = proc6(*(esp - 12), *(esp - 8), 0x23cc, ebx, esi, edi); /* Warning: also results in ebx */
            global79 = eax;
            if (*0x403024 == ebx) {
                local0 = eax;
                exit(*(esp - 4));
            }
            if (*0x403034 == ebx) {
                _cexit();
            }
            *(__size32*)(ebp - 4) = -2;
        } else {
            global61 = 1;
            *(__size32*)(esp_3 - 16) = 0x4020dc;
            *(__size32*)(esp_3 - 20) = 0x4020d0;
            eax = _initterm_e(); /* Warning: also results in edx */
            esp = esp_3 - 12;
            if (eax == 0) {
                goto L16;
            } else {
                *(__size32*)(ebp - 4) = -2;
            }
        }
    } else {
        *(__size32*)(esp_3 - 16) = 31;
        edx = _amsg_exit();
        goto L16;
    }
    proc8(ebp);
    return;
}