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

Disassembly:
sub esp, 0x3c
push ebx
push ebp
push esi
mov esi, ecx
mov ecx, dword [esi + 0xc4]
push edi
mov dword [esp + 0x38], esi
call fcn.0043c970
lea ebp, [esi + 0xcc]
mov ecx, ebp
mov dword [esp + 0x28], eax
call fcn.0043c970
mov dword [esp + 0x3c], eax
mov eax, dword [esi + 0xc4]
mov ecx, dword [eax + 0x228]
test ecx, ecx
jne 0x40e998
mov ecx, dword [eax + 0x188]
test ecx, ecx
jne 0x40e98f
xor ebx, ebx
mov dword [esp + 0x10], ebx
jmp 0x40e9a4
mov ebx, dword [eax + 0x78]
mov dword [esp + 0x10], ebx
jmp 0x40e9a4
mov ecx, dword [eax + 0x1c0]
mov dword [esp + 0x10], ecx
mov ebx, ecx
mov ecx, dword [eax + 0x228]
test ecx, ecx
jne 0x40e9c1
mov ecx, dword [eax + 0x188]
test ecx, ecx
jne 0x40e9bc
xor edi, edi
jmp 0x40e9c7
mov edi, dword [eax + 0x7c]
jmp 0x40e9c7
mov edi, dword [eax + 0x1bc]
mov ecx, dword [eax + 0x228]
test ecx, ecx
jne 0x40e9e4
mov ecx, dword [eax + 0x188]
test ecx, ecx
jne 0x40e9df
xor eax, eax
jmp 0x40e9ea
mov eax, dword [eax + 0x74]
jmp 0x40e9ea
mov eax, dword [eax + 0x1c4]
cdq
and edx, 3
add eax, edx
sar eax, 2
mov dword [esp + 0x48], eax
mov eax, dword [ebp + 0x228]
test eax, eax
jne 0x40ea14
mov eax, dword [ebp + 0x188]
test eax, eax
jne 0x40ea0f
xor eax, eax
jmp 0x40ea1a
mov eax, dword [ebp + 0x74]
jmp 0x40ea1a
mov eax, dword [ebp + 0x1c4]
cdq
and edx, 3
lea ecx, [edi - 2]
add eax, edx
mov edx, dword [esi + 0x310]
mov dword [esp + 0x24], ecx
mov ebp, ebx
mov ecx, edi
sar eax, 2
shr ebp, 1
shr ecx, 1
test edi, edi
mov dword [esp + 0x34], eax
mov dword [esp + 0x30], ebp
mov dword [esp + 0x44], ecx
jle 0x40ebf0
neg ecx
mov dword [esp + 0x14], ecx
lea ecx, [edi - 1]
shr ecx, 1
mov dword [esp + 0x20], edx
mov edx, dword [esp + 0x3c]
inc ecx
mov dword [esp + 0x1c], edx
mov dword [esp + 0x3c], ecx
jmp 0x40ea70
test ebx, ebx
mov edi, dword [esp + 0x1c]
jle 0x40ebb8
mov eax, dword [esp + 0x20]
mov dword [esp + 0x18], eax
lea eax, [ebx - 1]
shr eax, 1
neg ebp
inc eax
mov dword [esp + 0x2c], eax
mov ecx, dword [esp + 0x18]
mov eax, dword [ecx]
imul eax, dword [esp + 0x50]
cdq
and edx, 0xff
add eax, edx
sar eax, 8
and eax, 0x3ff
shl eax, 2
mov ecx, dword [eax + esi + 0x1314]
mov ebx, dword [eax + esi + 0x314]
mov eax, dword [esp + 0x14]
imul eax, ebx
cdq
and edx, 0x3ff
add eax, edx
sar eax, 0xa
mov dword [esp + 0x40], eax
mov eax, ebp
imul eax, ecx
cdq
and edx, 0x3ff
add eax, edx
mov edx, dword [esp + 0x30]
mov esi, eax
mov eax, dword [esp + 0x40]
add eax, edx
sar esi, 0xa
add esi, eax
mov eax, dword [esp + 0x14]
imul eax, ecx
cdq
and edx, 0x3ff
add eax, edx
mov ecx, eax
mov eax, ebp
imul eax, ebx
cdq
and edx, 0x3ff
add eax, edx
mov edx, dword [esp + 0x44]
sar ecx, 0xa
sar eax, 0xa
sub ecx, eax
add ecx, edx
cmp esi, 1
jge 0x40eb2f
mov eax, dword [esp + 0x10]
add eax, 0xfffffffe
add esi, eax
mov eax, dword [esp + 0x10]
add eax, 0xfffffffe
cmp esi, eax
jl 0x40eb3c
sub esi, eax
cmp ecx, 1
mov eax, dword [esp + 0x24]
jge 0x40eb47
add ecx, eax
cmp ecx, eax
jl 0x40eb4d
sub ecx, eax
mov edx, dword [esp + 0x48]
mov ebx, dword [esp + 0x28]
mov eax, ecx
imul eax, edx
add eax, esi
inc ecx
imul ecx, edx
mov edx, dword [esp + 0x28]
lea eax, [ebx + eax*4]
mov ebx, dword [eax]
mov dword [edi], ebx
mov eax, dword [eax + 4]
mov dword [edi + 4], eax
add ecx, esi
mov esi, dword [esp + 0x18]
lea eax, [edx + ecx*4]
mov edx, dword [eax]
mov ecx, dword [esp + 0x34]
mov dword [edi + ecx*4], edx
mov eax, dword [eax + 4]
mov dword [edi + ecx*4 + 4], eax
mov eax, dword [esp + 0x2c]
add esi, 8
add ebp, 2
add edi, 8
dec eax
mov dword [esp + 0x18], esi
mov esi, dword [esp + 0x38]
mov dword [esp + 0x2c], eax
jne 0x40ea90
mov ebp, dword [esp + 0x30]
mov ebx, dword [esp + 0x10]
mov eax, ecx
mov ecx, dword [esp + 0x3c]
mov edi, dword [esp + 0x1c]
lea edx, [eax*8]
add edi, edx
mov edx, dword [esp + 0x14]
add edx, 2
mov dword [esp + 0x1c], edi
mov edi, dword [esp + 0x20]
mov dword [esp + 0x14], edx
lea edx, [ebx*8]
add edi, edx
dec ecx
mov dword [esp + 0x20], edi
mov dword [esp + 0x3c], ecx
jne 0x40ea70
lea ecx, [esi + 0xcc]
call fcn.0043c9e0
mov ecx, dword [esi + 0xc4]
call fcn.0043c9e0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x3c
ret 4