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

Disassembly:
sub esp, 0x60
mov eax, dword [esp + 0x64]
push ebx
push ebp
push esi
mov esi, ecx
push edi
mov cl, byte [eax]
mov byte [esi], cl
lea ebp, [esi + 4]
xor ecx, ecx
lea ebx, [esi + 0x14]
mov dword [ebp], ecx
mov dword [ebp + 4], ecx
mov dword [ebp + 8], ecx
mov dword [ebp + 0xc], ecx
mov dword [ebx], ecx
mov dword [ebx + 4], ecx
mov dword [ebx + 8], ecx
mov dword [ebx + 0xc], ecx
mov dword [esi + 0x24], ecx
mov dword [esi + 0x28], ecx
mov dword [esi + 0x2c], ecx
mov edx, dword [eax + 4]
mov edi, dword [eax + 0x1c]
mov dword [esp + 0x20], edx
mov edx, dword [eax + 8]
mov dword [esp + 0x68], edi
mov dword [esp + 0x24], edx
mov edx, dword [eax + 0xc]
mov eax, dword [eax + 0x10]
cmp edx, edi
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x20]
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x24]
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x18], edx
mov dword [esp + 0x1c], eax
je 0x40a2c4
cmp dword [esi + 0x2c], ecx
je 0x40a131
mov edi, dword [esi + 0x1c]
mov edx, dword [esi + 0x18]
cmp edi, edx
je 0x40a131
lea eax, [edi + 0x10]
cmp eax, edx
mov dword [esi + 0x1c], eax
jne 0x40a0ff
mov ecx, dword [esp + 0x18]
push ecx
push edi
call fcn.0040aba0
add esp, 8
mov ecx, esi
call fcn.0040a520
jmp 0x40a27d
cmp edi, ecx
je 0x40a27f
mov edx, dword [esp + 0x18]
push ecx
mov ecx, edi
mov al, byte [edx]
mov byte [edi], al
call fcn.0040a4d0
mov ecx, dword [0x44d890]
mov edx, dword [esp + 0x18]
push ecx
push 0
push edx
mov ecx, edi
call fcn.0040a2d0
jmp 0x40a27d
push 0x1000
call fcn.0043a903
mov edi, eax
mov eax, dword [esi + 0x2c]
add esp, 4
test eax, eax
jne 0x40a1a5
mov ecx, esi
mov dword [esi + 0x28], 2
call fcn.0040a8e0
mov eax, dword [esi + 0x24]
mov dword [eax + 4], edi
mov ecx, dword [esi + 0x24]
add ecx, 4
add edi, 0x800
push ecx
push edi
lea ecx, [esp + 0x28]
call fcn.0040ab70
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x28]
mov edi, ebp
mov dword [edi], eax
mov dword [edi + 4], ecx
mov dword [edi + 8], edx
mov edx, dword [esp + 0x2c]
mov dword [edi + 0xc], edx
mov edi, ebx
mov dword [edi], eax
mov eax, dword [esp + 0x28]
mov dword [edi + 4], ecx
mov dword [edi + 8], eax
mov dword [edi + 0xc], edx
jmp 0x40a266
mov ecx, dword [esi + 0x28]
mov edx, dword [esi + 0x24]
mov eax, dword [esi + 0x20]
lea ecx, [edx + ecx*4 - 4]
cmp eax, ecx
jae 0x40a1eb
add eax, 4
lea ecx, [esp + 0x30]
mov dword [esi + 0x20], eax
mov dword [eax], edi
mov edx, dword [esi + 0x20]
push edx
push edi
call fcn.0040ab70
mov ecx, dword [esp + 0x30]
mov edx, dword [esp + 0x34]
mov eax, ebx
mov dword [eax], ecx
mov ecx, dword [esp + 0x38]
mov dword [eax + 4], edx
mov edx, dword [esp + 0x3c]
mov dword [eax + 8], ecx
mov dword [eax + 0xc], edx
jmp 0x40a266
mov ecx, dword [esi + 0x10]
sub eax, ecx
mov ecx, esi
sar eax, 2
inc eax
mov dword [esp + 0x74], eax
add eax, eax
push eax
call fcn.0040a900
mov ecx, dword [esp + 0x74]
push eax
lea ecx, [eax + ecx*4]
mov dword [esp + 0x78], ecx
mov dword [ecx], edi
mov edx, dword [esi + 0xc]
push edx
lea ecx, [esp + 0x48]
call fcn.0040ab70
mov ecx, dword [esp + 0x40]
mov edx, dword [esp + 0x44]
mov eax, ebp
mov dword [eax], ecx
mov ecx, dword [esp + 0x48]
mov dword [eax + 4], edx
mov edx, dword [esp + 0x4c]
mov dword [eax + 8], ecx
lea ecx, [esp + 0x50]
mov dword [eax + 0xc], edx
mov eax, dword [esp + 0x74]
push eax
push edi
call fcn.0040ab70
mov edx, dword [esp + 0x50]
mov eax, dword [esp + 0x54]
mov ecx, ebx
mov dword [ecx], edx
mov edx, dword [esp + 0x58]
mov dword [ecx + 4], eax
mov eax, dword [esp + 0x5c]
mov dword [ecx + 8], edx
mov dword [ecx + 0xc], eax
mov eax, dword [esi + 0x1c]
mov edx, dword [esp + 0x18]
push edx
push eax
lea ecx, [eax + 0x10]
mov dword [esi + 0x1c], ecx
call fcn.0040aba0
add esp, 8
xor ecx, ecx
mov eax, dword [esi + 0x2c]
mov edx, dword [esp + 0x14]
inc eax
mov dword [esi + 0x2c], eax
mov eax, dword [esp + 0x18]
add eax, 0x10
cmp eax, edx
mov dword [esp + 0x18], eax
jne 0x40a2b4
mov eax, dword [esp + 0x1c]
add eax, 4
mov dword [esp + 0x1c], eax
mov eax, dword [eax]
mov dword [esp + 0x18], eax
lea edx, [eax + 0x1000]
mov dword [esp + 0x14], edx
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0x68]
cmp eax, edx
jne 0x40a0cc
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x60
ret 4