Function at 0x504e70
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x44
push ebx
mov ebx, dword [ebp + 0x10]
push esi
mov esi, dword [ebp + 8]
mov eax, dword [esi + 0x164]
push edi
mov dword [ebp - 0x1c], eax
cmp ebx, dword [esi + 0x90]
jne 0x504ea4
lea ecx, [esi + 0x120]
lea edx, [esi + 0x124]
mov dword [ebp - 8], ecx
mov dword [ebp - 0x10], edx
jmp 0x504eb3
mov eax, dword [esi + 0x12c]
mov dword [ebp - 8], eax
add eax, 4
mov dword [ebp - 0x10], eax
mov eax, dword [ebp + 0x14]
mov ecx, dword [ebp - 8]
mov dword [ecx], eax
jmp 0x504ec0
mov eax, dword [ebp + 0x14]
mov edi, dword [ebp + 0x18]
lea edx, [ebp - 4]
push edx
push edi
push eax
mov dword [ebp - 4], eax
mov eax, dword [ebx + 4]
push ebx
call eax
mov ecx, dword [ebp - 4]
mov edx, dword [ebp - 0x10]
add eax, 5
add esp, 0x10
mov dword [edx], ecx
cmp eax, 0x12
ja case.default.0x504eec
jmp dword [eax*4 + 0x5059b8]
mov eax, dword [ebx + 0x44]
mov edx, dword [ebx + 0x30]
sub ecx, eax
add eax, dword [ebp + 0x14]
push ecx
push eax
push ebx
call edx
movzx eax, ax
add esp, 0xc
mov dword [ebp - 0x20], eax
test ax, ax
je 0x504f47
mov eax, dword [esi + 0x3c]
test eax, eax
je 0x504f2c
mov edx, dword [esi + 4]
push 1
lea ecx, [ebp - 0x20]
push ecx
push edx
call eax
add esp, 0xc
jmp 0x504fb9
cmp dword [esi + 0x50], 0
je 0x504fb9
mov eax, dword [ebp + 0x14]
push eax
mov eax, dword [ebp - 4]
call fcn.00501890
add esp, 4
jmp 0x504fb9
mov ebx, dword [ebx + 0x44]
mov ecx, dword [ebp + 0x14]
mov edi, dword [ebp - 4]
lea eax, [ebx + ecx]
mov ecx, dword [ebp - 0x1c]
sub edi, ebx
mov ebx, dword [ebp + 0x10]
add ecx, 0x50
call fcn.00502e30
mov dword [ebp + 8], eax
test eax, eax
je 0x5058c7
mov edi, dword [ebp - 0x1c]
push 0
mov edx, eax
push edx
push esi
call fcn.00501ac0
mov ebx, eax
mov eax, dword [edi + 0x60]
add esp, 0xc
cmp byte [edi + 0x81], 0
mov dword [edi + 0x5c], eax
je 0x504fe6
cmp byte [edi + 0x82], 0
jne 0x504fe6
test ebx, ebx
jne 0x504ff8
mov eax, dword [esi + 0x78]
test eax, eax
je 0x505028
mov ecx, dword [ebp + 8]
push ebx
mov edx, dword [esi + 4]
push ecx
push edx
call eax
add esp, 0xc
mov ebx, dword [ebp + 0x10]
mov ecx, dword [ebp - 4]
mov edx, dword [ebp - 8]
mov dword [ebp + 0x14], ecx
mov dword [edx], ecx
mov eax, dword [esi + 0x1e0]
sub eax, 2
je 0x5059ac
dec eax
jne 0x504ec0
mov edx, dword [ebp + 0x1c]
pop edi
pop esi
mov dword [edx], ecx
pop ebx
mov esp, ebp
pop ebp
ret
test ebx, ebx
je 0x505882
cmp byte [ebx + 0x22], 0
je 0x50588e
cmp byte [ebx + 0x20], 0
jne 0x50589a
cmp dword [ebx + 0x1c], 0
jne 0x5058a6
cmp dword [ebx + 4], 0
je 0x50505c
cmp byte [esi + 0x134], 0
jne 0x505045
mov eax, dword [esi + 0x78]
test eax, eax
je 0x505028
mov ecx, dword [ebx]
push 0
jmp 0x504fac
cmp dword [esi + 0x50], 0
je 0x504fb6
mov eax, dword [ebp + 0x14]
mov ebx, dword [ebp + 0x10]
push eax
mov eax, dword [ebp - 4]
call fcn.00501890
add esp, 4
jmp 0x504fb9
push 0
call fcn.00501700
add esp, 4
test eax, eax
jne 0x5059b1
jmp 0x504fb6
cmp dword [esi + 0x70], 0
je 0x5050ab
mov edi, esi
mov byte [ebx + 0x20], 1
call fcn.00502880
mov byte [ebx + 0x20], 0
test eax, eax
je 0x5058c7
mov ecx, dword [ebx + 0x18]
mov edx, dword [ebx + 0x10]
push ecx
mov ecx, dword [ebx + 0x14]
push edx
mov edx, dword [esi + 0x74]
push ecx
push eax
mov eax, dword [esi + 0x70]
push edx
call eax
add esp, 0x14
test eax, eax
je 0x5058b2
mov ecx, dword [esi + 0x1b0]
mov dword [esi + 0x1ac], ecx
jmp 0x504fb6
cmp dword [esi + 0x50], 0
je 0x504fb6
mov edx, dword [ebp + 0x14]
mov eax, dword [ebp - 4]
mov ebx, dword [ebp + 0x10]
push edx
call fcn.00501890
add esp, 4
jmp 0x504fb9
mov edi, dword [esi + 0x170]
test edi, edi
je 0x5050e0
mov eax, dword [edi]
mov dword [esi + 0x170], eax
jmp 0x50510f
mov ecx, dword [esi + 0xc]
push 0x30
call ecx
mov edi, eax
add esp, 4
test edi, edi
je 0x5058c7
mov edx, dword [esi + 0xc]
push 0x20
call edx
add esp, 4
mov dword [edi + 0x24], eax
test eax, eax
je 0x5058be
add eax, 0x20
mov dword [edi + 0x28], eax
xor ecx, ecx
mov dword [edi + 0x2c], ecx
lea eax, [edi + 0x2c]
mov dword [ebp - 0x28], eax
mov eax, dword [esi + 0x16c]
mov dword [edi], eax
mov dword [esi + 0x16c], edi
mov dword [edi + 0x10], ecx
mov dword [edi + 0x14], ecx
mov eax, dword [ebx + 0x44]
add eax, dword [ebp + 0x14]
push eax
mov dword [edi + 4], eax
mov eax, dword [ebx + 0x20]
push ebx
call eax
mov dword [edi + 8], eax
inc dword [esi + 0x138]
mov eax, dword [edi + 4]
mov ecx, dword [edi + 8]
mov edx, dword [edi + 0x24]
add ecx, eax
mov dword [ebp + 8], eax
mov dword [ebp - 0xc], edx
mov eax, dword [edi + 0x28]
sub eax, 2
push eax
lea edx, [ebp - 0xc]
push edx
push ecx
lea eax, [ebp + 8]
push eax
mov dword [ebp - 0x14], ecx
mov ecx, dword [ebx + 0x40]
push ebx
call ecx
mov eax, dword [ebp - 0xc]
sub eax, dword [edi + 0x24]
mov edx, dword [ebp - 0x14]
sar eax, 1
add esp, 0x1c
mov dword [ebp - 0x18], eax
cmp dword [ebp + 8], edx
je 0x5051ea
mov ecx, dword [edi + 0x24]
mov eax, dword [edi + 0x28]
sub eax, ecx
add eax, eax
push eax
mov dword [ebp - 0x24], eax
mov eax, dword [esi + 0x10]
push ecx
call eax
add esp, 8
test eax, eax
je 0x5058c7
mov ecx, dword [ebp - 0x24]
lea edx, [eax + ecx]
mov ecx, dword [ebp - 0x18]
mov dword [edi + 0x28], edx
lea edx, [eax + ecx*2]
mov dword [edi + 0x24], eax
mov dword [ebp - 0xc], edx
mov eax, dword [edi + 0x28]
mov edx, dword [ebp - 0x14]
sub eax, 2
push eax
lea ecx, [ebp - 0xc]
push ecx
mov ecx, dword [ebx + 0x40]
push edx
lea eax, [ebp + 8]
push eax
push ebx
call ecx
mov edx, dword [ebp - 0xc]
sub edx, dword [edi + 0x24]
mov eax, dword [ebp - 0x14]
sar edx, 1
add esp, 0x14
mov dword [ebp - 0x18], edx
cmp dword [ebp + 8], eax
jne 0x505187
mov edx, dword [edi + 0x24]
mov ecx, dword [ebp - 0x18]
mov dword [edi + 0x18], ecx
lea eax, [edi + 0xc]
mov dword [eax], edx
mov edx, dword [ebp - 0xc]
xor ecx, ecx
mov word [edx], cx
mov ecx, dword [ebp - 0x28]
mov edx, dword [ebp + 0x14]
push ecx
push eax
push edx
push ebx
push esi
mov dword [ebp + 8], eax
call fcn.005045b0
add esp, 0x14
test eax, eax
jne 0x5059b1
mov eax, dword [esi + 0x34]
test eax, eax
je 0x50524b
mov ecx, dword [esi + 0x188]
mov edx, dword [ebp + 8]
push ecx
mov ecx, dword [edx]
mov edx, dword [esi + 4]
push ecx
push edx
call eax
add esp, 0xc
lea ecx, [esi + 0x1a0]
call fcn.00501e00
jmp 0x504fb9
cmp dword [esi + 0x50], 0
je 0x505260
mov eax, dword [ebp + 0x14]
push eax
mov eax, dword [ebp - 4]
call fcn.00501890
add esp, 4
lea ecx, [esi + 0x1a0]
call fcn.00501e00
jmp 0x504fb9
mov eax, dword [ebx + 0x44]
add eax, dword [ebp + 0x14]
mov edx, dword [ebx + 0x20]
push eax
lea ecx, [esi + 0x1a0]
push ebx
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x14], 0
mov byte [ebp + 0xb], 1
mov dword [ebp - 0x18], ecx
call edx
mov ebx, dword [ebp + 0x10]
mov ecx, dword [ebp - 0x18]
mov edi, eax
mov eax, dword [ebp - 0x28]
add esp, 8
add edi, eax
call fcn.00502e30
mov dword [ebp - 0x44], eax
test eax, eax
je 0x5058c7
mov eax, dword [esi + 0x1ac]
lea ecx, [ebp - 0x14]
push ecx
lea edx, [ebp - 0x44]
push edx
mov dword [esi + 0x1b0], eax
mov eax, dword [ebp + 0x14]
push eax
push ebx
push esi
call fcn.005045b0
add esp, 0x14
test eax, eax
jne 0x5059b1
mov eax, dword [esi + 0x34]
mov ecx, dword [esi + 0x1ac]
mov edi, dword [ebp - 0x44]
mov dword [esi + 0x1b0], ecx
test eax, eax
je 0x505309
mov edx, dword [esi + 0x188]
mov ecx, dword [esi + 4]
push edx
push edi
push ecx
call eax
add esp, 0xc
xor al, al
jmp 0x50530c
mov al, byte [ebp + 0xb]
cmp dword [esi + 0x38], 0
je 0x505331
cmp dword [esi + 0x34], 0
je 0x505322
mov edx, dword [ebp - 0x10]
mov eax, dword [edx]
mov ecx, dword [ebp - 8]
mov dword [ecx], eax
mov edx, dword [esi + 4]
mov eax, dword [esi + 0x38]
push edi
push edx
call eax
add esp, 8
jmp 0x50534a
test al, al
je 0x50534a
cmp dword [esi + 0x50], 0
je 0x50534a
mov ecx, dword [ebp + 0x14]
mov eax, dword [ebp - 4]
push ecx
call fcn.00501890
add esp, 4
mov ecx, dword [ebp - 0x18]
call fcn.00501e00
mov edi, dword [ebp - 0x14]
test edi, edi
je 0x505396
lea esp, [esp]
mov eax, dword [esi + 0x68]
mov ebx, edi
test eax, eax
je 0x505377
mov edx, dword [edi]
mov ecx, dword [edx]
mov edx, dword [esi + 4]
push ecx
push edx
call eax
add esp, 8
mov ecx, dword [esi + 0x178]
lea eax, [edi + 4]
mov edi, dword [eax]
mov dword [eax], ecx
mov dword [esi + 0x178], ebx
mov edx, dword [ebx]
mov eax, dword [ebx + 8]
mov dword [edx + 4], eax
test edi, edi
jne 0x505360
cmp dword [esi + 0x138], 0
jne 0x504fb6
mov eax, dword [ebp + 0x1c]
mov ecx, dword [ebp + 0x18]
mov edx, dword [ebp - 4]
push eax
push ecx
push edx
push esi
call fcn.00504210
add esp, 0x10
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp + 0xc]
cmp dword [esi + 0x138], ecx
je 0x5059a0
mov edi, dword [esi + 0x16c]
mov edx, dword [edi]
mov eax, dword [esi + 0x170]
mov dword [esi + 0x16c], edx
mov dword [edi], eax
mov edx, dword [ebp + 0x14]
mov dword [esi + 0x170], edi
mov ecx, dword [ebx + 0x44]
lea eax, [edx + ecx*2]
push eax
mov dword [ebp - 0x14], eax
mov eax, dword [ebx + 0x20]
push ebx
call eax
add esp, 8
cmp eax, dword [edi + 8]
jne 0x5058d3
mov ecx, dword [ebp - 0x14]
mov dword [ebp + 8], ecx
mov ecx, dword [edi + 4]
mov edx, dword [ebp + 8]
mov dword [ebp - 0x18], ecx
cmp eax, 4
jb 0x505441
lea ecx, [ecx]
mov ecx, dword [ecx]
cmp ecx, dword [edx]
jne 0x5058d3
mov ecx, dword [ebp - 0x18]
sub eax, 4
add edx, 4
add ecx, 4
mov dword [ebp + 8], edx
mov dword [ebp - 0x18], ecx
cmp eax, 4
jae 0x505420
test eax, eax
je 0x505477
mov dl, byte [edx]
cmp dl, byte [ecx]
jne 0x5058d3
cmp eax, 1
jbe 0x505477
mov edx, dword [ebp + 8]
mov dl, byte [edx + 1]
cmp dl, byte [ecx + 1]
jne 0x5058d3
cmp eax, 2
jbe 0x505477
mov eax, dword [ebp + 8]
mov dl, byte [eax + 2]
cmp dl, byte [ecx + 2]
jne 0x5058d3
dec dword [esi + 0x138]
cmp dword [esi + 0x38], 0
je 0x50550e
cmp byte [esi + 0xec], 0
mov edx, dword [edi + 0x10]
je 0x5054fc
test edx, edx
je 0x5054fc
mov ecx, dword [edi + 0xc]
mov eax, dword [edi + 0x1c]
lea eax, [ecx + eax*2]
movzx ecx, word [edx]
test cx, cx
je 0x5054c1
jmp 0x5054b0
add edx, 2
mov word [eax], cx
movzx ecx, word [edx]
add eax, 2
test cx, cx
jne 0x5054b0
cmp byte [esi + 0xed], 0
mov edx, dword [edi + 0x14]
je 0x5054f7
test edx, edx
je 0x5054f7
mov cx, word [esi + 0x1d8]
mov word [eax], cx
movzx ecx, word [edx]
add eax, 2
test cx, cx
je 0x5054f7
add edx, 2
mov word [eax], cx
movzx ecx, word [edx]
add eax, 2
test cx, cx
jne 0x5054e6
xor edx, edx
mov word [eax], dx
mov eax, dword [edi + 0xc]
mov ecx, dword [esi + 4]
mov edx, dword [esi + 0x38]
push eax
push ecx
call edx
add esp, 8
jmp 0x505523
cmp dword [esi + 0x50], 0
je 0x505523
mov eax, dword [ebp + 0x14]
push eax
mov eax, dword [ebp - 4]
call fcn.00501890
add esp, 4
cmp dword [edi + 0x2c], 0
je 0x505576
lea esp, [esp]
mov ecx, dword [esi + 0x68]
mov eax, dword [edi + 0x2c]
mov dword [ebp + 8], eax
test ecx, ecx
je 0x505550
mov edx, eax
mov eax, dword [edx]
mov edx, dword [eax]
mov eax, dword [esi + 4]
push edx
push eax
call ecx
mov eax, dword [ebp + 8]
add esp, 8
mov ecx, dword [edi + 0x2c]
mov edx, dword [ecx + 4]
mov dword [edi + 0x2c], edx
mov ecx, dword [esi + 0x178]
mov dword [eax + 4], ecx
mov dword [esi + 0x178], eax
mov edx, dword [eax]
mov eax, dword [eax + 8]
mov dword [edx + 4], eax
cmp dword [edi + 0x2c], 0
jne 0x505530
cmp dword [esi + 0x138], 0
je 0x5053a3
jmp 0x504fb9
mov ecx, dword [ebp + 0x14]
mov edx, dword [ebx + 0x2c]
push ecx
push ebx
call edx
add esp, 8
test eax, eax
js 0x5058e7
cmp dword [esi + 0x3c], 0
je 0x5055c3
lea ecx, [ebp - 0x2c]
push ecx
push eax
call fcn.005117d0
mov ecx, dword [esi + 0x3c]
push eax
mov eax, dword [esi + 4]
lea edx, [ebp - 0x2c]
push edx
push eax
call ecx
add esp, 0x14
jmp 0x504fb9
cmp dword [esi + 0x50], 0
je 0x504fb9
mov edx, dword [ebp + 0x14]
mov eax, dword [ebp - 4]
push edx
call fcn.00501890
add esp, 4
jmp 0x504fb9
mov eax, dword [esi + 0x3c]
test eax, eax
je case.default.0x504eec
mov edx, dword [esi + 4]
push 1
lea ecx, [ebp + 8]
push ecx
push edx
mov dword [ebp + 8], 0xa
call eax
add esp, 0xc
jmp 0x504fb9
mov eax, dword [esi + 0x48]
test eax, eax
je 0x505616
mov ecx, dword [esi + 4]
push ecx
call eax
jmp 0x505627
cmp dword [esi + 0x50], 0
je 0x50562a
mov edx, dword [ebp + 0x14]
push edx
mov eax, ecx
call fcn.00501890
add esp, 4
mov eax, dword [ebp + 0x20]
mov ecx, dword [ebp + 0x1c]
push eax
push ecx
lea edx, [ebp - 4]
push edi
push edx
mov eax, ebx
mov ecx, esi
call fcn.005022a0
add esp, 0x10
test eax, eax
jne 0x5059b1
cmp dword [ebp - 4], eax
jne 0x504fb9
pop edi
mov dword [esi + 0x118], 0x503040
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edi, dword [esi + 0x3c]
test edi, edi
je 0x50571f
cmp byte [ebx + 0x49], 0
je 0x505691
mov eax, dword [ebp + 0x14]
test al, 1
jne 0x505691
sub ecx, eax
sar ecx, 1
push ecx
push eax
mov eax, dword [esi + 4]
push eax
call edi
add esp, 0xc
jmp 0x504fb9
mov edx, dword [esi + 0x2c]
mov eax, dword [esi + 0x30]
push eax
mov dword [ebp + 8], edx
lea edx, [ebp + 8]
push edx
push ecx
mov ecx, dword [ebx + 0x40]
lea eax, [ebp + 0x14]
push eax
push ebx
call ecx
mov edx, dword [ebp + 0x14]
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp + 8]
mov dword [eax], edx
mov eax, dword [esi + 0x2c]
mov edx, dword [esi + 4]
sub ecx, eax
sar ecx, 1
push ecx
push eax
push edx
call edi
mov eax, dword [ebp + 0x14]
mov ecx, dword [ebp - 4]
add esp, 0x20
cmp eax, ecx
je 0x504fb9
mov edx, dword [ebp - 8]
mov dword [edx], eax
mov eax, dword [esi + 0x2c]
mov edx, dword [esi + 0x30]
push edx
mov edx, dword [ebx + 0x40]
mov dword [ebp + 8], eax
lea eax, [ebp + 8]
push eax
push ecx
lea ecx, [ebp + 0x14]
push ecx
push ebx
call edx
mov eax, dword [ebp + 0x14]
mov ecx, dword [ebp - 0x10]
mov edx, dword [ebp + 8]
mov dword [ecx], eax
mov eax, dword [esi + 0x2c]
sub edx, eax
sar edx, 1
push edx
push eax
mov eax, dword [esi + 4]
push eax
call edi
mov eax, dword [ebp + 0x14]
mov ecx, dword [ebp - 4]
add esp, 0x20
cmp eax, ecx
jne 0x5056d5
jmp 0x504fb9
cmp dword [esi + 0x50], 0
je 0x504fb9
mov edx, dword [ebp + 0x14]
push edx
mov eax, ecx
call fcn.00501890
add esp, 4
jmp 0x504fb9
mov eax, dword [ebp + 0x14]
push ecx
push eax
mov ecx, ebx
mov edx, esi
call fcn.00503af0
add esp, 8
test eax, eax
je 0x5058c7
jmp 0x504fb9
mov edx, dword [ebp + 0x14]
push edx
mov eax, ecx
mov ecx, ebx
mov edx, esi
call fcn.00503bc0
add esp, 4
test eax, eax
je 0x5058c7
jmp 0x504fb9
cmp dword [esi + 0x50], 0
je 0x504fb9
mov eax, dword [ebp + 0x14]
push eax
mov eax, ecx
call fcn.00501890
add esp, 4
jmp 0x504fb9
cmp byte [ebp + 0x20], 0
je 0x5057ad
mov eax, dword [ebp + 0x14]
mov ecx, dword [ebp + 0x1c]
pop edi
pop esi
mov dword [ecx], eax
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp - 0x10]
mov dword [edx], edi
mov eax, dword [esi + 0x3c]
test eax, eax
je 0x5057d1
mov edx, dword [esi + 4]
push 1
lea ecx, [ebp + 0x10]
push ecx
push edx
mov dword [ebp + 0x10], 0xa
call eax
add esp, 0xc
jmp 0x5057e5
cmp dword [esi + 0x50], 0
je 0x5057e5
mov eax, dword [ebp + 0x14]
push eax
mov eax, edi
call fcn.00501890
add esp, 4
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x505983
cmp dword [esi + 0x138], eax
jne 0x5059a0
mov ecx, dword [ebp + 0x1c]
mov dword [ecx], edi
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
cmp byte [ebp + 0x20], 0
je 0x505821
mov eax, dword [ebp + 0x1c]
mov edx, dword [ebp + 0x14]
pop edi
pop esi
mov dword [eax], edx
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp + 0xc]
test eax, eax
jle 0x505983
cmp dword [esi + 0x138], eax
jne 0x5059a0
mov ecx, dword [ebp + 0x14]
mov edx, dword [ebp + 0x1c]
pop edi
pop esi
mov dword [edx], ecx
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 8]
pop edi
pop esi
mov dword [eax], ecx
mov eax, 4
pop ebx
mov esp, ebp
pop ebp
ret
cmp byte [ebp + 0x20], 0
jne 0x505838
pop edi
pop esi
mov eax, 5
pop ebx
mov esp, ebp
pop ebp
ret
cmp byte [ebp + 0x20], 0
jne 0x50579c
pop edi
pop esi
mov eax, 6
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
mov eax, 0xb
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
mov eax, 0x18
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
mov eax, 0xc
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
mov eax, 0xf
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
mov eax, 0x15
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [esi + 0x14]
push edi
call edx
add esp, 4
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 0x14]
pop edi
pop esi
mov dword [eax], ecx
mov eax, 7
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
mov eax, 0xe
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
mov eax, 0x11
pop ebx
mov esp, ebp
pop ebp
ret
cmp byte [ebp + 0x20], 0
jne 0x505810
mov ecx, dword [esi + 0x3c]
test ecx, ecx
je 0x505963
cmp byte [ebx + 0x49], 0
je 0x505930
mov eax, dword [ebp + 0x14]
test al, 1
jne 0x505930
mov edx, edi
sub edx, eax
sar edx, 1
push edx
push eax
mov eax, dword [esi + 4]
push eax
call ecx
add esp, 0xc
jmp 0x505977
mov edx, dword [esi + 0x30]
mov ecx, dword [esi + 0x2c]
push edx
mov edx, dword [ebx + 0x40]
lea eax, [ebp + 0x10]
push eax
mov dword [ebp + 0x10], ecx
push edi
lea ecx, [ebp + 0x14]
push ecx
push ebx
call edx
mov eax, dword [esi + 0x2c]
mov ecx, dword [ebp + 0x10]
mov edx, dword [esi + 4]
sub ecx, eax
sar ecx, 1
push ecx
push eax
mov eax, dword [esi + 0x3c]
push edx
call eax
add esp, 0x20
jmp 0x505977
cmp dword [esi + 0x50], 0
je 0x505977
mov ecx, dword [ebp + 0x14]
push ecx
mov eax, edi
call fcn.00501890
add esp, 4
mov eax, dword [ebp + 0xc]
test eax, eax
jne 0x50598f
mov edx, dword [ebp - 8]
mov dword [edx], edi
pop edi
pop esi
mov eax, 3
pop ebx
mov esp, ebp
pop ebp
ret
cmp dword [esi + 0x138], eax
je 0x5057fc
mov eax, dword [ebp - 8]
mov dword [eax], edi
pop edi
pop esi
mov eax, 0xd
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, 0x23
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret