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

Disassembly:
sub esp, 0x10
push ebx
push edi
mov edi, dword [esp + 0x1c]
movzx eax, byte [edi + 0x5e]
mov ecx, dword [edi + 0x5c]
mov ebx, ecx
mov dword [esp + 0x14], eax
mov eax, dword [edi + 0x20]
and ebx, 0xffff
test eax, eax
mov dword [esp + 0xc], ebx
jne 0x4016f0
pop edi
or eax, 0xffffffff
pop ebx
add esp, 0x10
ret
push esi
xor esi, esi
mov dword [esp + 0x20], esi
mov eax, 0x51a924
lea esp, [esp]
mov edx, dword [eax - 0x84]
test edx, edx
je 0x40173f
cmp dword [eax], 0
je 0x401734
mov edx, dword [eax + 0x84]
test edx, edx
je 0x401737
mov edx, dword [eax + 0x108]
test edx, edx
je 0x40173c
add eax, 0x210
add esi, 4
cmp eax, 0x53b924
jl 0x401700
jmp 0x40173f
inc esi
jmp 0x40173f
add esi, 2
jmp 0x40173f
add esi, 3
cmp esi, 0x400
mov dword [esp + 0x20], esi
jne 0x401755
pop esi
pop edi
or eax, 0xffffffff
pop ebx
add esp, 0x10
ret
imul esi, esi, 0x84
test bl, 3
mov dword [esi + 0x51a8fc], ecx
mov ecx, dword [edi + 0x60]
mov dword [esi + 0x51a900], ecx
je 0x4017c3
mov ecx, dword [edi + 4]
test ecx, ecx
je 0x40174b
mov dl, bl
and dl, 2
neg dl
push ecx
sbb edx, edx
and edx, 3
dec edx
mov eax, edx
push eax
call fcn.00437460
mov ecx, dword [0x4cdd0c]
mov eax, dword [0x4cdd08]
mov dword [esi + 0x51a8bc], ecx
mov dword [esi + 0x51a8b8], eax
mov edx, dword [edi + 0x3c]
or ecx, 0xffffffff
add esp, 8
cmp edx, ecx
jne 0x4017b3
mov dword [edi + 0x3c], eax
cmp dword [edi + 0x40], ecx
jne 0x40181f
mov edx, dword [0x4cdd0c]
mov dword [edi + 0x40], edx
jmp 0x40181f
test bl, 8
je 0x401803
mov eax, dword [edi + 4]
test eax, eax
je 0x40174b
cmp byte [eax], 0
je 0x40174b
mov eax, dword [edi + 0x3c]
cmp eax, 0xffffffff
je 0x40174b
cmp dword [edi + 0x40], 0xffffffff
je 0x40174b
mov dword [esi + 0x51a8b8], eax
mov eax, dword [edi + 0x40]
mov dword [esi + 0x51a8bc], eax
jmp 0x40181f
test bl, 0x10
jne 0x40181f
mov ecx, dword [edi + 0x3c]
or eax, 0xffffffff
cmp ecx, eax
je 0x40174b
cmp dword [edi + 0x40], eax
je 0x40174b
push ebp
mov ebp, ebx
and ebp, 0x40
mov dword [esp + 0x18], ebp
je 0x401858
mov eax, 0x320
mov edx, 0x258
mov ecx, 0xfffffffe
mov dword [esi + 0x51a8d4], eax
mov dword [esi + 0x51a8d8], edx
cmp dword [edi + 0x3c], ecx
jne 0x40184e
mov dword [edi + 0x3c], eax
cmp dword [edi + 0x40], ecx
jne 0x4018b8
mov dword [edi + 0x40], edx
jmp 0x4018b8
mov ecx, dword [edi + 0x20]
push ecx
push 2
call fcn.00437460
add esp, 8
cmp eax, 2
jne 0x401b45
test byte [0x4cdd04], 1
jne 0x401885
pop ebp
pop esi
pop edi
mov eax, 0xffffffff
pop ebx
add esp, 0x10
ret
mov edx, dword [0x4cdd0c]
mov eax, dword [0x4cdd08]
mov dword [esi + 0x51a8d4], eax
mov dword [esi + 0x51a8d8], edx
mov edx, dword [edi + 0x3c]
mov ecx, 0xfffffffe
cmp edx, ecx
jne 0x4018ab
mov dword [edi + 0x3c], eax
cmp dword [edi + 0x40], ecx
jne 0x4018b8
mov eax, dword [0x4cdd0c]
mov dword [edi + 0x40], eax
mov eax, dword [edi + 0x3c]
test eax, eax
jle 0x401b45
mov eax, dword [edi + 0x40]
test eax, eax
jle 0x401b45
mov ecx, dword [edi + 0x3c]
mov dword [esi + 0x51a8dc], ecx
mov edx, dword [edi + 0x40]
mov dword [esi + 0x51a8e0], edx
mov eax, dword [edi + 8]
mov dword [esi + 0x51a8a8], eax
mov ecx, dword [edi + 0xc]
mov dword [esi + 0x51a8ac], ecx
mov edx, dword [edi + 0x24]
mov ecx, dword [esp + 0x24]
mov dword [esi + 0x51a8c4], edx
mov eax, dword [edi + 0x28]
push ecx
mov dword [esi + 0x51a8c8], eax
call section..text
add esp, 4
neg eax
sbb eax, eax
inc eax
test bh, 1
mov dword [esp + 0x10], eax
je 0x4019d7
test ebp, ebp
je 0x401935
mov ebp, dword [0x4ed440]
mov ebx, dword [0x4ed444]
jmp 0x401942
movzx ebp, word [0x4cdd06]
lea ebx, [ebp + 1]
sar ebx, 3
mov edx, dword [esi + 0x51a8e8]
imul edx, dword [esi + 0x51a8e4]
imul edx, ebx
add edx, 0x14
push edx
push 0
call fcn.0043aec0
push eax
push 1
mov dword [esi + 0x51a90c], eax
call fcn.0043b010
mov dword [0x4cdce4], eax
mov dword [eax], 0x4b504e55
mov eax, dword [0x4cdce4]
shl ebp, 0x10
or ebp, 1
mov dword [eax + 4], ebp
mov ecx, dword [0x4cdce4]
mov dword [ecx + 8], 0
mov edx, dword [esi + 0x51a8e8]
mov eax, dword [0x4cdce4]
mov dword [eax + 0xc], edx
mov ecx, dword [esi + 0x51a8e8]
imul ecx, dword [esi + 0x51a8e4]
mov edx, dword [0x4cdce4]
imul ecx, ebx
mov dword [edx + 0x10], ecx
mov eax, dword [esi + 0x51a90c]
push eax
push 2
call fcn.0043b010
mov eax, dword [esp + 0x28]
mov ebx, dword [esp + 0x2c]
mov ebp, dword [esp + 0x30]
add esp, 0x18
jmp 0x4019e1
mov dword [esi + 0x51a90c], 0
test bl, 0x10
je 0x401a95
test ebp, ebp
je 0x4019fc
mov ebp, dword [0x4ed440]
mov ebx, dword [0x4ed444]
jmp 0x401a09
movzx ebp, word [0x4cdd06]
lea ebx, [ebp + 1]
sar ebx, 3
mov ecx, dword [esi + 0x51a8e8]
imul ecx, dword [esi + 0x51a8e4]
imul ecx, ebx
add ecx, 0x14
push ecx
push 0
call fcn.0043aec0
push eax
push 1
mov dword [edi + 4], eax
call fcn.0043b010
mov dword [0x4cdce4], eax
mov dword [eax], 0x4b504e55
mov edx, dword [0x4cdce4]
shl ebp, 0x10
or ebp, 1
mov dword [edx + 4], ebp
mov eax, dword [esi + 0x51a8e4]
mov ecx, dword [0x4cdce4]
mov dword [ecx + 8], eax
mov edx, dword [esi + 0x51a8e8]
mov eax, dword [0x4cdce4]
mov dword [eax + 0xc], edx
mov ecx, dword [esi + 0x51a8e8]
imul ecx, dword [esi + 0x51a8e4]
mov edx, dword [0x4cdce4]
imul ecx, ebx
mov dword [edx + 0x10], ecx
mov eax, dword [edi + 4]
push eax
push 2
call fcn.0043b010
mov eax, dword [esp + 0x28]
mov ebx, dword [esp + 0x2c]
add esp, 0x18
mov cx, word [edi + 0x78]
cmp cx, 0xffff
jne 0x401ab5
mov ecx, dword [esp + 0x1c]
mov dx, word [ecx*4 + 0x469040]
mov word [esi + 0x51a918], dx
jmp 0x401abc
mov word [esi + 0x51a918], cx
test bh, 2
jne 0x401ad1
test eax, eax
jne 0x401ad1
mov dword [esi + 0x51a8a0], 1
jmp 0x401adb
mov dword [esi + 0x51a8a0], 0xb
mov ax, word [edi + 0x68]
cmp ax, 0x3e8
jbe 0x401af0
mov word [esi + 0x51a908], 0x3e8
jmp 0x401af7
mov word [esi + 0x51a908], ax
mov eax, dword [edi + 4]
mov dword [esi + 0x51a8a4], eax
mov ecx, dword [edi + 0x20]
mov dword [esi + 0x51a8c0], ecx
mov edx, dword [edi + 0x4c]
mov dword [esi + 0x51a8ec], edx
mov eax, dword [edi + 0x58]
mov dword [esi + 0x51a8f8], eax
mov ecx, dword [edi + 0x50]
mov dword [esi + 0x51a8f0], ecx
mov edx, dword [edi + 0x54]
mov dword [esi + 0x51a8f4], edx
mov eax, dword [edi + 0x80]
pop ebp
mov dword [esi + 0x51a920], eax
mov eax, dword [esp + 0x20]
pop esi
pop edi
pop ebx
add esp, 0x10
ret
pop ebp
pop esi
pop edi
or eax, 0xffffffff
pop ebx
add esp, 0x10
ret