aorecomp

Anarchy Online classic in the browser

git clone https://aorecomp.ubeagle.com/code/aorecomp.git


client/game/kkr.dll/lifted-0149.c (6426B)


      1 #define RECOMP_GENERATED_CODE
      2 #include "recomp_types.h"
      3 #include <math.h>
      4 #include <stdio.h>
      5 #include <stdlib.h>
      6 #include <string.h>
      7 
      8 void sub_3616E04B(void) {
      9     int _fpu_cmp = 0;
     10     uint32_t _cf = 0;
     11     int _df = 1;
     12     uint32_t _flag_k = FK_NONE;
     13     uint32_t _flag_a = 0, _flag_b = 0;
     14     uint32_t _itail_tgt = 0;
     15     RECOMP_REGS_LOCALS
     16     RECOMP_ENTER(0x3616E04Bu);
     17 
     18 L_3616E04B:
     19     eax = MEM32(ebp + (-0x24)); /* 0x3616E04B: mov eax, dword ptr [ebp - 0x24] */
     20     PUSH32(esp, eax); /* 0x3616E04E: push eax */
     21     RECOMP_ICALL(0x3615FCC4u); /* 0x3616E04F: call 0x3615fcc4 */ /* not lifted */
     22     RECOMP_FLAGS_IN();
     23     ecx = POP32_VAL(esp); /* 0x3616E054: pop ecx */
     24     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3616E055: ret  */
     25     RECOMP_REGS_OUT();
     26 }
     27 
     28 void sub_3616E056(void) {
     29     int _fpu_cmp = 0;
     30     uint32_t _cf = 0;
     31     int _df = 1;
     32     uint32_t _flag_k = FK_NONE;
     33     uint32_t _flag_a = 0, _flag_b = 0;
     34     uint32_t _itail_tgt = 0;
     35     RECOMP_REGS_LOCALS
     36     RECOMP_ENTER(0x3616E056u);
     37 
     38 L_3616E056:
     39     eax = MEM32(ebp + (-0x28)); /* 0x3616E056: mov eax, dword ptr [ebp - 0x28] */
     40     PUSH32(esp, eax); /* 0x3616E059: push eax */
     41     RECOMP_ICALL(0x3615FCC4u); /* 0x3616E05A: call 0x3615fcc4 */ /* not lifted */
     42     RECOMP_FLAGS_IN();
     43     ecx = POP32_VAL(esp); /* 0x3616E05F: pop ecx */
     44     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3616E060: ret  */
     45     RECOMP_REGS_OUT();
     46 }
     47 
     48 void sub_3616E061(void) {
     49     int _fpu_cmp = 0;
     50     uint32_t _cf = 0;
     51     int _df = 1;
     52     uint32_t _flag_k = FK_NONE;
     53     uint32_t _flag_a = 0, _flag_b = 0;
     54     uint32_t _itail_tgt = 0;
     55     RECOMP_REGS_LOCALS
     56     RECOMP_ENTER(0x3616E061u);
     57 
     58     goto L_3616E061;
     59 L_3615FD76:
     60     { _itail_tgt = (uint32_t)(MEM32(0x3616F26C)); goto _ljump; }
     61 L_3616E061:
     62     eax = 0x36194D40u; /* 0x3616E061: mov eax, 0x36194d40 */
     63 L_3616E066:
     64     RECOMP_BACKEDGE();
     65     goto L_3615FD76; /* 0x3616E066: jmp 0x3615fd76 */
     66     { RECOMP_REGS_OUT(); return; } /* end of function */
     67   _ljump:
     68     switch (_itail_tgt) {
     69       case 0x3615FD76u: goto L_3615FD76;
     70       case 0x3616E061u: goto L_3616E061;
     71       case 0x3616E066u: goto L_3616E066;
     72       default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; }
     73     }
     74     RECOMP_REGS_OUT();
     75 }
     76 
     77 void sub_3616E070(void) {
     78     int _fpu_cmp = 0;
     79     uint32_t _cf = 0;
     80     int _df = 1;
     81     uint32_t _flag_k = FK_NONE;
     82     uint32_t _flag_a = 0, _flag_b = 0;
     83     uint32_t _itail_tgt = 0;
     84     RECOMP_REGS_LOCALS
     85     RECOMP_ENTER(0x3616E070u);
     86 
     87 L_3616E070:
     88     eax = MEM32(ebp + (-0x10)); /* 0x3616E070: mov eax, dword ptr [ebp - 0x10] */
     89     PUSH32(esp, eax); /* 0x3616E073: push eax */
     90     RECOMP_ICALL(0x3615FCC4u); /* 0x3616E074: call 0x3615fcc4 */ /* not lifted */
     91     RECOMP_FLAGS_IN();
     92     ecx = POP32_VAL(esp); /* 0x3616E079: pop ecx */
     93     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3616E07A: ret  */
     94     RECOMP_REGS_OUT();
     95 }
     96 
     97 void sub_3616E07B(void) {
     98     int _fpu_cmp = 0;
     99     uint32_t _cf = 0;
    100     int _df = 1;
    101     uint32_t _flag_k = FK_NONE;
    102     uint32_t _flag_a = 0, _flag_b = 0;
    103     uint32_t _itail_tgt = 0;
    104     RECOMP_REGS_LOCALS
    105     RECOMP_ENTER(0x3616E07Bu);
    106 
    107     goto L_3616E07B;
    108 L_3615FD76:
    109     { _itail_tgt = (uint32_t)(MEM32(0x3616F26C)); goto _ljump; }
    110 L_3616E07B:
    111     eax = 0x36194D90u; /* 0x3616E07B: mov eax, 0x36194d90 */
    112 L_3616E080:
    113     RECOMP_BACKEDGE();
    114     goto L_3615FD76; /* 0x3616E080: jmp 0x3615fd76 */
    115     { RECOMP_REGS_OUT(); return; } /* end of function */
    116   _ljump:
    117     switch (_itail_tgt) {
    118       case 0x3615FD76u: goto L_3615FD76;
    119       case 0x3616E07Bu: goto L_3616E07B;
    120       case 0x3616E080u: goto L_3616E080;
    121       default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; }
    122     }
    123     RECOMP_REGS_OUT();
    124 }
    125 
    126 void sub_3616E090(void) {
    127     int _fpu_cmp = 0;
    128     uint32_t _cf = 0;
    129     int _df = 1;
    130     uint32_t _flag_k = FK_NONE;
    131     uint32_t _flag_a = 0, _flag_b = 0;
    132     uint32_t _itail_tgt = 0;
    133     RECOMP_REGS_LOCALS
    134     RECOMP_ENTER(0x3616E090u);
    135 
    136     goto L_3616E090;
    137 L_36140470:
    138     PUSH32(esp, ebp); /* 0x36140470: push ebp */
    139     ebp = esp; /* 0x36140471: mov ebp, esp */
    140     PUSH32(esp, ecx); /* 0x36140473: push ecx */
    141     PUSH32(esp, esi); /* 0x36140474: push esi */
    142     esi = ecx; /* 0x36140475: mov esi, ecx */
    143     eax = MEM32(esi + 0x8); /* 0x36140477: mov eax, dword ptr [esi + 8] */
    144     PUSH32(esp, eax); /* 0x3614047A: push eax */
    145     MEM32(ebp + (-0x4)) = eax; /* 0x3614047B: mov dword ptr [ebp - 4], eax */
    146     RECOMP_ICALL(0x3615FCC4u); /* 0x3614047E: call 0x3615fcc4 */ /* not lifted */
    147     RECOMP_FLAGS_IN();
    148     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
    149     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
    150     esp = esp + 4; /* 0x36140483: add esp, 4 */
    151     _flag_k = FK_ADD;
    152     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
    153     eax = 0; /* 0x36140486: xor eax, eax */
    154     _cf = 0;
    155     _flag_k = FK_TEST;
    156     MEM32(esi + 0x8) = eax; /* 0x36140488: mov dword ptr [esi + 8], eax */
    157     MEM32(esi + 0xC) = eax; /* 0x3614048B: mov dword ptr [esi + 0xc], eax */
    158     MEM32(esi + 0x10) = eax; /* 0x3614048E: mov dword ptr [esi + 0x10], eax */
    159     esi = POP32_VAL(esp); /* 0x36140491: pop esi */
    160     esp = ebp; /* 0x36140492: mov esp, ebp */
    161     ebp = POP32_VAL(esp); /* 0x36140494: pop ebp */
    162     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x36140495: ret  */
    163 L_3616E090:
    164     ecx = ebp + (-0x2C); /* 0x3616E090: lea ecx, [ebp - 0x2c] */
    165     RECOMP_BACKEDGE();
    166     goto L_36140470; /* 0x3616E093: jmp 0x36140470 */
    167     { RECOMP_REGS_OUT(); return; } /* end of function */
    168     RECOMP_REGS_OUT();
    169 }
    170 
    171 void sub_3616E098(void) {
    172     int _fpu_cmp = 0;
    173     uint32_t _cf = 0;
    174     int _df = 1;
    175     uint32_t _flag_k = FK_NONE;
    176     uint32_t _flag_a = 0, _flag_b = 0;
    177     uint32_t _itail_tgt = 0;
    178     RECOMP_REGS_LOCALS
    179     RECOMP_ENTER(0x3616E098u);
    180 
    181     goto L_3616E098;
    182 L_3615FD76:
    183     { _itail_tgt = (uint32_t)(MEM32(0x3616F26C)); goto _ljump; }
    184 L_3616E098:
    185     eax = 0x36194DB8u; /* 0x3616E098: mov eax, 0x36194db8 */
    186 L_3616E09D:
    187     RECOMP_BACKEDGE();
    188     goto L_3615FD76; /* 0x3616E09D: jmp 0x3615fd76 */
    189     { RECOMP_REGS_OUT(); return; } /* end of function */
    190   _ljump:
    191     switch (_itail_tgt) {
    192       case 0x3615FD76u: goto L_3615FD76;
    193       case 0x3616E098u: goto L_3616E098;
    194       case 0x3616E09Du: goto L_3616E09D;
    195       default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; }
    196     }
    197     RECOMP_REGS_OUT();
    198 }