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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x144
mov eax, dword [0x4c4cc0]
xor eax, esp
mov dword [esp + 0x140], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
lea edi, [eax + 0x70]
mov dword [esp + 0x24], eax
mov dword [esp + 0x60], edi
call fcn.0040abe6
xor esi, esi
lea eax, [esp + 0x88]
mov dword [esp + 0x20], esi
call fcn.0040a71b
lea eax, [esp + 0x2c]
push eax
call fcn.00417aab
mov eax, esp
mov dword [eax], esi
mov ecx, dword [esp + 0x30]
lea edx, [esp + 0x8c]
call fcn.00417c17
mov eax, dword [esp + 0x11c]
sub eax, dword [esp + 0x118]
mov ecx, 0x370
cdq
idiv ecx
mov dword [esp + 0x1c], esi
test eax, eax
je 0x40a6eb
mov dword [esp + 0x18], esi
mov ebx, dword [esp + 0x18]
mov ecx, dword [esp + 0x118]
add ebx, ecx
cmp dword [ebx + 0x78], 3
mov dword [esp + 0x34], ebx
jbe 0x40a6b8
add ebx, 0x68
cmp dword [ebx + 0x14], 8
jb 0x40a42f
mov eax, dword [ebx]
jmp 0x40a431
mov eax, ebx
push ecx
mov esi, esp
push eax
call fcn.00402642
mov ecx, dword [esp + 0x28]
call fcn.0040a2eb
lea edi, [esp + 0x44]
call fcn.0040d2dc
cmp dword [ebx + 0x14], 8
mov esi, dword [esp + 0x34]
mov edi, dword [ebx + 0x10]
lea ecx, [esi + 0x224]
jb 0x40a463
mov eax, dword [ebx]
jmp 0x40a465
mov eax, ebx
push eax
mov eax, dword [ecx + 0x10]
call fcn.0040ccaf
test eax, eax
jne 0x40a6af
push 8
pop edi
cmp dword [ebx + 0x14], edi
jb 0x40a480
mov ebx, dword [ebx]
push ebx
lea eax, [esp + 0x48]
push eax
call fcn.0040260a
lea eax, [esi + 0x1d0]
cmp dword [eax + 0x14], edi
jb 0x40a498
mov eax, dword [eax]
push eax
lea eax, [esp + 0x4c]
push eax
call fcn.0040260a
lea eax, [esi + 0x1b4]
cmp dword [eax + 0x14], edi
jb 0x40a4b0
mov eax, dword [eax]
push eax
lea eax, [esp + 0x50]
push eax
call fcn.0040260a
lea eax, [esi + 0x198]
cmp dword [eax + 0x14], edi
jb 0x40a4c8
mov eax, dword [eax]
push eax
lea eax, [esp + 0x54]
push eax
call fcn.0040260a
mov edi, dword [esi + 0x158]
mov dword [esp + 0x30], edi
cmp edi, dword [esi + 0x15c]
je 0x40a602
lea eax, [esi + 0x350]
mov dword [esp + 0x10], eax
lea ebx, [edi + 0x54]
mov eax, dword [ebx - 0x50]
mov ecx, dword [esp + 0x10]
mov dword [esp + 0x14], eax
lea eax, [esp + 0x14]
push eax
lea eax, [esp + 0x2c]
call fcn.0040b466
mov eax, dword [esp + 0x10]
mov eax, dword [eax + 4]
mov ecx, dword [esp + 0x28]
cmp ecx, eax
je 0x40a52d
mov edx, dword [esp + 0x14]
cmp edx, dword [ecx + 0x10]
jl 0x40a52d
lea eax, [esp + 0x28]
jmp 0x40a535
mov dword [esp + 0x64], eax
lea eax, [esp + 0x64]
mov eax, dword [eax]
cmp eax, dword [esi + 0x354]
je 0x40a5e9
mov ecx, dword [eax + 0x20]
mov dword [esp + 0x14], ecx
test ecx, ecx
je 0x40a5e9
cmp byte [eax + 0x1b], 0
jne 0x40a5e9
mov eax, dword [section..data]
mov ecx, section..data
call dword [eax + 0xc]
add eax, 0x10
lea esi, [esp + 0x3c]
mov dword [esp + 0x38], eax
call fcn.0040ecd8
and dword [esp + 0x40], 0
cmp dword [ebx + 0x1c], 8
jb 0x40a589
mov eax, dword [ebx + 8]
jmp 0x40a58c
lea eax, [ebx + 8]
push eax
lea eax, [esp + 0x3c]
push eax
call fcn.0040260a
cmp dword [ebx], 8
jb 0x40a5a1
mov eax, dword [ebx - 0x14]
jmp 0x40a5a4
lea eax, [ebx - 0x14]
push eax
lea eax, [esp + 0x40]
push eax
call fcn.0040260a
mov eax, dword [esp + 0x14]
mov dword [esp + 0x40], eax
lea eax, [esp + 0x38]
push eax
push dword [esp + 0x58]
lea edi, [esp + 0x5c]
call fcn.0040cdd1
mov eax, dword [esp + 0x3c]
add eax, 0xfffffff0
call fcn.00402878
mov eax, dword [esp + 0x38]
add eax, 0xfffffff0
call fcn.00402878
mov esi, dword [esp + 0x34]
mov edi, dword [esp + 0x30]
mov eax, 0xc4
add edi, eax
add ebx, eax
mov dword [esp + 0x30], edi
cmp edi, dword [esi + 0x15c]
jne 0x40a4f6
cmp dword [esp + 0x58], 2
jb 0x40a650
lea eax, [esp + 0x44]
call fcn.0040a8c4
push dword [esp + 0x44]
lea ecx, [esp + 0x70]
call fcn.00407327
lea eax, [esp + 0x44]
push eax
push ecx
mov ecx, dword [esp + 0x68]
lea eax, [esp + 0x74]
push eax
call fcn.0040ab3d
add esp, 4
call fcn.0040a7b0
push 0
push 1
lea ecx, [esp + 0x74]
call fcn.004018e2
mov eax, dword [esp + 0x58]
add dword [esp + 0x20], eax
mov esi, dword [esp + 0x24]
mov eax, dword [esp + 0x20]
cmp eax, dword [esi + 0x40]
ja 0x40a6e2
call fcn.004074cf
cmp dword [eax + 4], 0
je 0x40a6af
mov ecx, dword [esi + 0x84]
mov eax, dword [ecx]
mov dword [esp + 0x10], eax
cmp eax, ecx
je 0x40a6af
cmp byte [eax + 0x28], 0
jne 0x40a69a
push eax
lea eax, [esp + 0x6c]
push eax
lea eax, [esi + 0x80]
push eax
call fcn.0040ad0d
mov eax, dword [eax]
mov dword [esp + 0x10], eax
lea eax, [esp + 0x10]
call fcn.0040b542
mov eax, dword [esp + 0x10]
cmp eax, dword [esi + 0x84]
jne 0x40a67c
lea ebx, [esp + 0x44]
call fcn.0040a78a
mov eax, dword [esp + 0x11c]
sub eax, dword [esp + 0x118]
mov ecx, 0x370
cdq
idiv ecx
inc dword [esp + 0x1c]
add dword [esp + 0x18], ecx
cmp dword [esp + 0x1c], eax
jne 0x40a407
jmp 0x40a6eb
lea ebx, [esp + 0x44]
call fcn.0040a78a
mov esi, dword [esp + 0x2c]
test esi, esi
je 0x40a6f8
call fcn.0040b4f0
lea edi, [esp + 0x88]
call fcn.0040a75f
mov ecx, dword [esp + 0x14c]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00478b4c
mov esp, ebp
pop ebp
ret 4