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

Disassembly:
sub esp, 0x884
push ebx
push ebp
push esi
push edi
mov eax, 0xcccccccc
mov ecx, 0x200
lea edi, [esp + 0x90]
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0x898]
push eax
lea edx, [esp + 0x44]
xor ebp, ebp
call fcn.00409ad0
mov ebx, dword [esp + 0x48]
imul ebx, dword [esp + 0x50]
mov edx, dword [esp + 0x8c]
lea ecx, [ebx + 7]
shr ecx, 3
add ecx, dword [esp + 0x88]
add esp, 4
lea esi, [ecx + edx*4 + 0x4c]
lea eax, [esi + 0xc]
push eax
mov dword [esp + 0x40], eax
call fcn.0057a5f1
add esp, 4
mov dword [esp + 0x2c], eax
test eax, eax
je 0x40a167
lea ebp, [eax + 0xc]
mov dword [eax + 8], esi
mov edi, ebp
mov dword [eax], 0x1a544542
mov dword [eax + 4], 1
mov ecx, 0x13
lea esi, [esp + 0x40]
rep movsd dword es:[edi], dword [esi]
lea edi, [ebx + 7]
shr edi, 3
add edi, 8
add ebp, 0x4c
push edi
mov dword [esp + 0x18], ebp
call fcn.0057a5f1
mov esi, eax
add esp, 4
test esi, esi
je 0x40a02c
push edi
push 0
push esi
call fcn.00578cb0
mov ecx, dword [esp + 0x50]
mov eax, dword [esp + 0x8a4]
add esp, 0xc
mov dword [esi], ebx
mov ebx, dword [eax + 0x58]
test ecx, ecx
jbe 0x409fe8
mov edi, dword [esp + 0x54]
mov eax, dword [esp + 0x58]
mov ebp, dword [esp + 0x50]
sub eax, edi
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x5c]
sub ebp, edi
sub eax, edi
mov dword [esp + 0x20], eax
mov dword [esp + 0x10], ecx
lea esp, [esp]
mov ecx, dword [esp + 0x64]
push ecx
lea edx, [edi + ebp]
push edx
mov eax, ebx
call fcn.00408ed0
mov ecx, dword [esp + 0x70]
push ecx
lea eax, [ebx + 0x20]
push edi
call fcn.00408ed0
mov edx, dword [esp + 0x7c]
mov ecx, dword [esp + 0x40]
push edx
add ecx, edi
lea eax, [ebx + 0x24]
push ecx
call fcn.00408ed0
mov edx, dword [ebx + 0x28]
add esp, 0x18
xor eax, eax
lea ebx, [ebx]
mov ecx, dword [esp + eax*4 + 0x90]
cmp ecx, 0xcccccccc
je 0x40a0a1
cmp ecx, edx
je 0x40a0a1
inc eax
cmp eax, 0x200
jb 0x409f90
or eax, 0xffffffff
mov edx, dword [esp + 0x70]
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x20]
add eax, edi
push edx
push eax
lea eax, [esp + 0x20]
call fcn.00408ed0
add edi, dword [esp + 0x54]
add esp, 8
add ebx, 0x48
sub dword [esp + 0x10], 1
jne 0x409f50
mov ebp, dword [esp + 0x14]
mov edi, dword [esp + 0x88]
add edi, edi
add edi, edi
push edi
lea ecx, [esp + 0x94]
push ecx
push ebp
call fcn.0057bfc0
add ebp, edi
mov edi, dword [esi]
add esp, 0xc
add edi, 7
shr edi, 3
push edi
lea edx, [esi + 4]
push edx
push ebp
call fcn.0057bfc0
add esp, 0xc
add ebp, edi
push esi
mov dword [esp + 0x18], ebp
call fcn.00579483
add esp, 4
mov ebx, dword [esp + 0x78]
imul ebx, dword [esp + 0x44]
lea edi, [ebx + 7]
shr edi, 3
add edi, 8
push edi
call fcn.0057a5f1
mov esi, eax
add esp, 4
test esi, esi
je 0x40a140
push edi
push 0
push esi
call fcn.00578cb0
mov eax, dword [esp + 0x8a4]
mov dword [esi], ebx
mov edi, dword [eax + 0x58]
mov eax, dword [eax + 0x54]
mov edx, dword [eax + 0x10]
mov ebp, dword [eax + 8]
mov ecx, dword [eax + 0xc]
mov eax, dword [eax + 0x14]
mov dword [esp + 0x2c], edx
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x50]
xor edx, edx
add esp, 0xc
mov dword [esp + 0x30], ebp
mov dword [esp + 0x34], ecx
cmp eax, edx
jbe 0x40a11d
xor ebx, ebx
add edi, 0x44
mov dword [esp + 0x10], eax
jmp 0x40a0b2
mov dword [esp + eax*4 + 0x90], edx
jmp 0x409fb6
xor edx, edx
test dword [edi - 0x1c], 0x80000000
mov dword [esp + 0x18], edx
mov dword [esp + 0x1c], edx
je 0x40a0f7
mov ecx, dword [edi]
cmp ecx, edx
je 0x40a0f7
call fcn.00407780
mov ecx, eax
mov eax, dword [esp + 0x34]
and ecx, ebp
or ecx, dword [esp + 0x20]
and edx, eax
or edx, dword [esp + 0x24]
shrd ebp, eax, 8
and ecx, ebp
mov ebp, dword [esp + 0x30]
shr eax, 8
and edx, eax
mov dword [esp + 0x18], ecx
mov dword [esp + 0x1c], edx
mov edx, dword [esp + 0x80]
push edx
push ebx
lea eax, [esp + 0x20]
call fcn.00408ed0
add ebx, dword [esp + 0x80]
add esp, 8
add edi, 0x48
sub dword [esp + 0x10], 1
jne 0x40a0b0
mov eax, dword [esi]
mov edx, dword [esp + 0x14]
add eax, 7
shr eax, 3
push eax
lea ecx, [esi + 4]
push ecx
push edx
call fcn.0057bfc0
add esp, 0xc
push esi
call fcn.00579483
add esp, 4
mov eax, dword [esp + 0x89c]
test eax, eax
je 0x40a158
mov ecx, dword [esp + 0x3c]
mov dword [eax], ecx
mov dword [eax + 4], 0
mov eax, dword [esp + 0x2c]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x884
ret
pop edi
pop esi
mov eax, ebp
pop ebp
pop ebx
add esp, 0x884
ret