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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x14
mov eax, dword [0x559940]
xor eax, esp
mov dword [esp + 0x10], eax
push ebx
push esi
mov esi, ecx
xor ebx, ebx
push edi
mov edi, edx
mov dword [esp + 0x14], esi
mov dword [esp + 0x10], edi
mov eax, dword [esi + 0x28]
test eax, eax
jne 0x416399
mov eax, dword [0x55a51c]
test eax, eax
je 0x41607c
push 0x190
call eax
add esp, 4
test eax, eax
je 0x41607c
lea eax, [ebx + 0xa]
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x10]
xor ecx, esp
call fcn.004f49c2
mov esp, ebp
pop ebp
ret
cmp byte [esi + 0x10], 3
jae 0x416096
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x10]
xor ecx, esp
call fcn.004f49c2
mov esp, ebp
pop ebp
ret
mov edx, 1
mov ecx, esi
call fcn.00411e90
test eax, eax
jne 0x4160c4
mov eax, dword [esi + 0x58]
test eax, eax
je 0x41638a
mov dword [eax + 0x10], 1
mov eax, dword [eax + 0x2c]
test eax, eax
jne 0x4160b1
jmp 0x41638a
cmp dword [esi + 0xd4], ebx
je 0x416199
mov ecx, dword [esi + 0xd0]
mov edx, dword [ecx]
test edx, edx
je 0x4160ec
nop dword [eax]
mov eax, dword [edx + 0x20]
mov dword [edx + 0x10], eax
mov edx, eax
test edx, edx
jne 0x4160e0
mov ecx, dword [ecx]
call fcn.0040fbf0
mov dword [esp + 0x18], ebx
test eax, eax
jne 0x416116
push eax
lea eax, [esp + 0x1c]
push eax
mov eax, dword [esi + 0xc8]
push 1
push esi
call eax
mov eax, dword [esp + 0x28]
add esp, 0x10
mov dword [eax + 0x10], ebx
push 1
push dword [esi + 0x18]
mov edx, eax
mov ecx, esi
call fcn.004130e0
mov edx, dword [esp + 0x20]
add esp, 8
mov ebx, eax
test edx, edx
je 0x416181
test byte [edx + 0x1c], 0x20
je 0x41617a
mov eax, dword [edx + 0x14]
dec dword [eax + 0x78]
mov ecx, dword [eax + 0x88]
mov dword [edx + 0x10], ecx
mov esi, dword [eax + 0x3c]
mov dword [eax + 0x88], edx
push dword [edx + 4]
mov ecx, dword [edx + 0x18]
mov eax, dword [eax + 0x98]
dec ecx
mov edi, dword [esi]
cdq
push edx
push eax
push 0
push ecx
call fcn.004f4a20
push edx
push eax
mov eax, dword [edi + 0x48]
push esi
call eax
mov esi, dword [esp + 0x24]
add esp, 0x10
jmp 0x416181
mov ecx, edx
call fcn.0040f8d0
test ebx, ebx
jne 0x416397
mov ecx, dword [esi + 0xd0]
call fcn.0040fa50
jmp 0x41638a
xor ebx, ebx
cmp byte [esi + 0x12], bl
jne 0x41629c
cmp dword [esi + 0x18], ebx
jbe 0x41629c
push ebx
lea eax, [esp + 0x1c]
push eax
mov eax, dword [esi + 0xc8]
push 1
push esi
call eax
mov ebx, eax
add esp, 0x10
test ebx, ebx
jne 0x416240
mov edx, dword [esp + 0x18]
test byte [edx + 0x1c], 4
mov ecx, dword [edx + 0x14]
je 0x4161ee
mov eax, dword [ecx + 0x18]
cmp eax, dword [edx + 0x18]
jb 0x4161ee
cmp dword [ecx + 0x60], ebx
je 0x4161ea
mov ecx, edx
call fcn.00414010
jmp 0x416211
xor ebx, ebx
jmp 0x41621b
mov ebx, dword [ecx + 0x28]
test ebx, ebx
jne 0x416244
mov eax, dword [ecx + 0x94]
cmp eax, dword [ecx + 0x98]
mov ecx, edx
jbe 0x41620c
call fcn.00415cd0
jmp 0x416211
call fcn.00415c50
mov ebx, eax
test ebx, ebx
jne 0x416240
mov edx, dword [esp + 0x18]
mov eax, dword [edx + 0x14]
mov ecx, dword [eax + 0x68]
mov eax, dword [edx + 4]
bswap ecx
inc ecx
bswap ecx
mov dword [eax + 0x18], ecx
mov eax, dword [edx + 4]
mov dword [eax + 0x5c], ecx
mov eax, dword [edx + 4]
mov dword [eax + 0x60], 0xc8182e00
mov byte [esi + 0x12], 1
mov edx, dword [esp + 0x18]
test edx, edx
je 0x41629c
test byte [edx + 0x1c], 0x20
je 0x416295
mov eax, dword [edx + 0x14]
dec dword [eax + 0x78]
mov ecx, dword [eax + 0x88]
mov dword [edx + 0x10], ecx
mov esi, dword [eax + 0x3c]
mov dword [eax + 0x88], edx
push dword [edx + 4]
mov ecx, dword [edx + 0x18]
mov eax, dword [eax + 0x98]
dec ecx
mov edi, dword [esi]
cdq
push edx
push eax
push 0
push ecx
call fcn.004f4a20
push edx
push eax
mov eax, dword [edi + 0x48]
push esi
call eax
mov esi, dword [esp + 0x24]
add esp, 0x10
mov edi, dword [esp + 0x10]
jmp 0x41629c
mov ecx, edx
call fcn.0040f8d0
test ebx, ebx
jne 0x416397
mov edx, edi
mov ecx, esi
call fcn.00411830
mov ebx, eax
test ebx, ebx
jne 0x416397
xor edx, edx
mov ecx, esi
call fcn.00413c60
mov ebx, eax
test ebx, ebx
jne 0x416397
mov ecx, dword [esi + 0xd0]
mov edx, dword [ecx]
test edx, edx
je 0x4162e2
mov eax, dword [edx + 0x20]
mov dword [edx + 0x10], eax
mov edx, eax
test edx, edx
jne 0x4162d6
mov ecx, dword [ecx]
call fcn.0040fbf0
mov edx, eax
mov ecx, esi
call fcn.00413ea0
mov ebx, eax
test ebx, ebx
jne 0x416397
mov ecx, dword [esi + 0xd0]
call fcn.0040fa50
mov edi, dword [esi + 0x18]
cmp edi, dword [esi + 0x20]
jbe 0x416334
mov eax, dword [0x55b1cc]
xor ecx, ecx
cdq
idiv dword [esi + 0x98]
inc eax
cmp edi, eax
sete cl
sub edi, ecx
mov ecx, esi
mov edx, edi
call fcn.00412970
mov ebx, eax
test ebx, ebx
jne 0x416397
cmp dword [ebp + 8], 0
jne 0x41638a
mov eax, dword [esi + 0x3c]
xor ebx, ebx
mov ecx, dword [eax]
test ecx, ecx
je 0x416363
push dword [esp + 0x10]
push 0x15
push eax
mov eax, dword [ecx + 0x28]
call eax
mov ebx, eax
add esp, 0xc
cmp ebx, 0xc
jne 0x41635f
xor ebx, ebx
jmp 0x416363
test ebx, ebx
jne 0x416397
cmp byte [esi + 7], 0
jne 0x416386
movzx ecx, byte [esi + 0xa]
mov edx, dword [esi + 0x3c]
test ecx, ecx
je 0x416384
mov eax, dword [edx]
push ecx
push edx
mov eax, dword [eax + 0x14]
call eax
add esp, 8
mov ebx, eax
jmp 0x416386
xor ebx, ebx
test ebx, ebx
jne 0x416397
cmp dword [esi + 0xd4], 0
jne 0x416397
mov byte [esi + 0x10], 5
mov eax, ebx
mov ecx, dword [esp + 0x1c]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.004f49c2
mov esp, ebp
pop ebp
ret