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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x84
push ebx
mov ebx, dword [ebp + 0xc]
push esi
mov esi, dword [ebp + 8]
mov dword [0x45be64], esi
mov dword [0x45be60], ebx
mov eax, dword [ebx + 0x10]
mov dword [0x45be70], eax
mov ecx, dword [ebx + 0x14]
mov dword [0x45be74], ecx
mov eax, dword [ebx + 0x14]
imul eax, dword [ebx + 0x10]
lea edx, [eax + eax*2]
shl edx, 3
push edi
push edx
call fcn.0041835e
mov dword [0x45be78], eax
mov ecx, dword [ebx + 0x10]
mov edx, dword [ebx + 0x14]
imul edx, ecx
xor eax, eax
add esp, 4
test edx, edx
mov dword [esp + 0x44], eax
jle 0x41023d
mov dword [esp + 0x48], eax
mov dword [esp + 0x54], eax
lea esp, [esp]
mov eax, dword [ebx + 0x18]
add eax, dword [esp + 0x54]
mov edx, dword [0x45be78]
mov dword [esp + 0x80], eax
mov eax, dword [esp + 0x48]
lea edi, [eax + edx]
mov eax, dword [esp + 0x44]
cdq
idiv ecx
mov ecx, dword [ebx + 8]
mov dword [esp + 0x8c], edi
imul ecx, edx
mov dword [esp + 0x34], eax
mov eax, dword [esi]
push eax
add ecx, dword [ebx]
push ecx
mov dword [esp + 0x48], edx
call fcn.0040f570
mov dword [edi], eax
mov eax, dword [ebx + 0xc]
imul eax, dword [esp + 0x3c]
mov edx, dword [esi + 4]
mov ecx, dword [ebx + 4]
push edx
add eax, ecx
push eax
call fcn.0040f570
mov edx, dword [esp + 0x50]
mov dword [edi + 4], eax
mov ecx, dword [esi + 8]
inc edx
imul edx, dword [ebx + 8]
push ecx
add edx, dword [ebx]
push edx
call fcn.0040f560
mov ecx, dword [esp + 0x4c]
mov dword [edi + 8], eax
mov eax, dword [esi + 0xc]
mov edx, dword [ebx + 4]
inc ecx
imul ecx, dword [ebx + 0xc]
push eax
add ecx, edx
push ecx
call fcn.0040f560
mov dword [edi + 0xc], eax
mov edx, dword [esi + 0x10]
mov dword [edi + 0x10], edx
mov eax, dword [esi + 0x10]
imul eax, eax, 0x1c
push eax
call fcn.0041835e
mov ecx, dword [edi + 0x10]
mov dword [edi + 0x14], eax
xor eax, eax
add esp, 0x24
cmp ecx, eax
mov dword [esp + 0x40], eax
jle 0x41020a
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], eax
mov dword [esp + 0x4c], eax
jmp 0x40fad0
mov ecx, dword [esp + 0x80]
mov eax, dword [ecx + 0x394]
mov ecx, dword [esp + 0x4c]
mov ebx, dword [edi + 0x14]
mov edx, dword [esi + 0x14]
add eax, ecx
mov dword [esp + 0x20], eax
add ebx, dword [esp + 0x34]
mov eax, dword [esp + 0x30]
mov ecx, dword [eax + edx]
mov edx, dword [edi]
push ecx
push edx
mov dword [esp + 0x8c], ebx
call fcn.0040f5b0
mov ecx, dword [esp + 0x38]
mov dword [ebx], eax
mov eax, dword [esi + 0x14]
mov edx, dword [ecx + eax + 4]
mov eax, dword [edi + 4]
push edx
push eax
call fcn.0040f5b0
mov edx, dword [esp + 0x40]
mov dword [ebx + 4], eax
mov ecx, dword [esi + 0x14]
mov eax, dword [edx + ecx]
mov ecx, dword [edi + 8]
push eax
push ecx
call fcn.0040f5b0
mov dword [ebx + 8], eax
mov edx, dword [esi + 0x14]
mov eax, dword [esp + 0x48]
mov ecx, dword [eax + edx + 4]
mov edx, dword [edi + 0xc]
push ecx
push edx
call fcn.0040f5b0
mov edx, dword [ebx]
mov ecx, dword [ebx + 8]
sub ecx, edx
mov edx, dword [ebx + 4]
mov dword [ebx + 0xc], eax
sub eax, edx
imul ecx, eax
shl ecx, 2
push ecx
call fcn.0041835e
mov edx, dword [esp + 0x44]
mov dword [ebx + 0x18], eax
mov eax, dword [edx + 4]
mov dword [ebx + 0x10], eax
imul eax, eax, 0x7c
push eax
call fcn.0041835e
mov ecx, dword [ebx + 0x10]
mov dword [ebx + 0x14], eax
xor eax, eax
add esp, 0x28
test ecx, ecx
mov dword [esp + 0x24], eax
jle 0x4101cf
jmp 0x40fba0
mov eax, dword [esp + 0x24]
lea esp, [esp]
mov esi, dword [ebx + 0x10]
mov edi, eax
imul edi, edi, 0x7c
sub esi, eax
mov eax, dword [ebx + 0x14]
dec esi
add edi, eax
mov eax, dword [ebx]
push esi
push eax
mov dword [esp + 0x34], esi
mov dword [esp + 0x68], edi
call fcn.0040f5c0
mov dword [edi], eax
mov ecx, dword [ebx + 4]
push esi
push ecx
call fcn.0040f5c0
mov dword [edi + 4], eax
mov edx, dword [ebx + 8]
push esi
push edx
call fcn.0040f5c0
mov dword [edi + 8], eax
mov eax, dword [ebx + 0xc]
push esi
push eax
call fcn.0040f5c0
xor ecx, ecx
mov dword [edi + 0xc], eax
mov eax, dword [esp + 0x44]
add esp, 0x20
test eax, eax
setne cl
lea ecx, [ecx + ecx + 1]
mov dword [edi + 0x18], ecx
mov ecx, dword [esp + 0x20]
test byte [ecx], 1
je 0x40fc1e
mov esi, dword [ecx + eax*4 + 0x344]
mov edx, ecx
mov ecx, dword [edx + eax*4 + 0x3c8]
mov dword [esp + 0xc], ecx
jmp 0x40fc27
mov esi, 0xf
mov dword [esp + 0xc], esi
mov edx, dword [edi]
push esi
push edx
call fcn.0040f5e0
mov ecx, esi
shl eax, cl
mov ecx, dword [edi + 4]
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x14]
push eax
push ecx
call fcn.0040f5e0
mov ecx, dword [esp + 0x1c]
mov edx, dword [edi + 8]
shl eax, cl
push esi
push edx
mov dword [esp + 0x30], eax
call fcn.0040f5c0
mov ecx, esi
shl eax, cl
mov ecx, dword [edi + 0xc]
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x24]
push eax
push ecx
call fcn.0040f5c0
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x34]
shl eax, cl
sub edx, dword [esp + 0x48]
mov ecx, esi
sar edx, cl
mov ecx, dword [esp + 0x2c]
mov dword [esp + 0x30], eax
add esp, 0x20
mov dword [edi + 0x10], edx
mov edx, eax
mov eax, dword [esp + 0x18]
sub edx, eax
sar edx, cl
mov ecx, dword [esp + 0x24]
test ecx, ecx
mov dword [edi + 0x14], edx
jne 0x40fcbb
mov ecx, dword [esp + 0x28]
mov edx, dword [esp + 0xc]
mov dword [esp + 0x74], ecx
mov dword [esp + 0x78], eax
mov dword [esp + 0x58], edx
jmp 0x40fd06
mov eax, dword [esp + 0x28]
push 1
push eax
call fcn.0040f5c0
mov ecx, dword [esp + 0x20]
push 1
push ecx
mov dword [esp + 0x84], eax
call fcn.0040f5c0
mov edx, dword [esp + 0x24]
push 1
push edx
mov dword [esp + 0x90], eax
call fcn.0040f5c0
mov eax, dword [esp + 0x28]
push 1
push eax
call fcn.0040f5c0
mov ecx, dword [esp + 0x2c]
add esp, 0x20
dec esi
dec ecx
mov dword [esp + 0x58], ecx
mov edx, esi
mov dword [esp + 0x5c], esi
mov esi, dword [esp + 0x20]
mov eax, dword [esi + 8]
push edx
push eax
call fcn.0040f560
mov ecx, dword [esp + 0x60]
mov edx, dword [esi + 0xc]
push ecx
push edx
mov dword [esp + 0x98], eax
call fcn.0040f560
mov dword [esp + 0x48], eax
mov eax, dword [edi + 0x18]
add esp, 0x10
test eax, eax
mov dword [esp + 0x28], 0
jle 0x4101b1
lea esi, [edi + 0x2c]
mov dword [esp + 0xc], esi
mov eax, dword [esp + 0x24]
xor edx, edx
cmp eax, edx
jne 0x40fd5e
xor eax, eax
jmp 0x40fd63
mov eax, dword [esp + 0x28]
inc eax
mov ecx, 1
cmp eax, ecx
mov dword [esi], eax
je 0x40fd77
cmp eax, 3
mov dword [esp + 0x18], edx
jne 0x40fd7b
mov dword [esp + 0x18], ecx
cmp eax, 2
je 0x40fd89
cmp eax, 3
mov dword [esp + 0x14], edx
jne 0x40fd8d
mov dword [esp + 0x14], ecx
cmp eax, edx
jne 0x40fdce
mov eax, dword [esp + 0x2c]
mov ecx, dword [ebx]
push eax
push ecx
call fcn.0040f5c0
mov edx, dword [esp + 0x34]
mov dword [esi - 0x10], eax
mov eax, dword [ebx + 4]
push edx
push eax
call fcn.0040f5c0
mov ecx, dword [esp + 0x3c]
mov dword [esi - 0xc], eax
mov edx, dword [ebx + 8]
push ecx
push edx
call fcn.0040f5c0
mov dword [esi - 8], eax
mov eax, dword [esp + 0x44]
mov ecx, dword [ebx + 0xc]
push eax
push ecx
jmp 0x40fe40
mov ecx, dword [esp + 0x2c]
mov eax, 1
shl eax, cl
lea edx, [ecx + 1]
push edx
mov edx, dword [ebx]
mov dword [esp + 0x14], eax
imul eax, dword [esp + 0x1c]
sub edx, eax
push edx
mov dword [esp + 0x44], eax
call fcn.0040f5c0
mov ecx, dword [esp + 0x34]
mov dword [esi - 0x10], eax
mov eax, dword [esp + 0x18]
imul eax, dword [esp + 0x1c]
inc ecx
push ecx
mov ecx, dword [ebx + 4]
sub ecx, eax
push ecx
mov dword [esp + 0x20], eax
call fcn.0040f5c0
mov ecx, dword [esp + 0x4c]
mov dword [esi - 0xc], eax
mov eax, dword [esp + 0x3c]
mov edx, dword [ebx + 8]
inc eax
push eax
sub edx, ecx
push edx
call fcn.0040f5c0
mov ecx, dword [esp + 0x28]
mov dword [esi - 8], eax
mov eax, dword [esp + 0x44]
inc eax
push eax
mov eax, dword [ebx + 0xc]
sub eax, ecx
push eax
call fcn.0040f5c0
mov dword [esi - 4], eax
mov eax, dword [esp + 0x44]
add esp, 0x20
test eax, eax
jne 0x40fe59
mov dword [esp + 0x1c], eax
jmp 0x40fe68
mov ecx, dword [esp + 0x28]
lea edx, [ecx + eax*2]
lea eax, [eax + edx - 2]
mov dword [esp + 0x1c], eax
mov ecx, dword [esp + 0x20]
mov eax, dword [ecx + 0x14]
test eax, eax
jne 0x40fe7d
mov edx, dword [esi]
push edx
call fcn.004110e0
jmp 0x40fe85
mov eax, dword [esi]
push eax
call fcn.00410cb0
mov ecx, dword [ebp + 8]
fld qword [0x42ca78]
mov edx, dword [ecx + 0x14]
mov ecx, dword [esp + 0x34]
mov ecx, dword [ecx + edx + 8]
mov edx, dword [esp + 0x24]
add ecx, eax
mov eax, dword [esp + 0x20]
sub ecx, dword [edx + eax*8 + 0x1c]
add esp, 4
mov dword [esp + 0x10], ecx
fild dword [esp + 0x10]
call fcn.0041a1d0
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x1c]
fild dword [ecx + edx*8 + 0x20]
sub esp, 8
fmul qword [0x42ca70]
fadd qword [0x42ca68]
fmulp st(1)
fmul qword [0x42ca60]
fstp qword [esp]
call fcn.00419f40
call fcn.0041a116
mov edx, dword [esp + 0x24]
mov dword [esi + 0xc], eax
mov eax, dword [esp + 0x28]
mov ecx, dword [eax + 0x33c]
mov eax, dword [eax + edx*8 + 0x1c]
lea ecx, [ecx + eax - 1]
mov dword [esi + 8], ecx
mov eax, dword [edi + 0x14]
imul eax, dword [edi + 0x10]
lea edx, [eax + eax*8]
shl edx, 2
push edx
call fcn.0041835e
mov dword [esi + 4], eax
mov eax, dword [edi + 0x14]
imul eax, dword [edi + 0x10]
xor edx, edx
add esp, 0xc
test eax, eax
mov dword [esp + 0x14], edx
jle 0x410196
mov ecx, dword [esp + 0x5c]
mov ebx, 1
shl ebx, cl
mov ecx, dword [esp + 0x58]
mov eax, 1
shl eax, cl
mov dword [esp + 0x68], ebx
mov dword [esp + 0x18], edx
mov dword [esp + 0x6c], eax
jmp 0x40ff60
mov ebx, dword [esp + 0x68]
lea esp, [esp]
mov edi, dword [edi + 0x10]
mov eax, dword [esp + 0x14]
cdq
idiv edi
mov esi, dword [esi + 4]
mov ecx, dword [esp + 0x18]
mov edi, ebx
mov ebx, dword [esp + 0x74]
add esi, ecx
mov ecx, dword [esp + 0xc]
imul edi, edx
mov edx, dword [esp + 0x78]
add edi, ebx
mov ebx, dword [esp + 0x6c]
imul ebx, eax
add ebx, edx
mov edx, dword [ecx - 0x10]
push edx
push edi
call fcn.0040f570
mov dword [esi], eax
mov eax, dword [esp + 0x14]
mov ecx, dword [eax - 0xc]
push ecx
push ebx
call fcn.0040f570
mov edx, dword [esp + 0x1c]
mov ecx, dword [esp + 0x78]
mov dword [esi + 4], eax
mov eax, dword [edx - 8]
push eax
add ecx, edi
push ecx
call fcn.0040f560
mov edx, dword [esp + 0x24]
mov ecx, dword [esp + 0x84]
mov dword [esi + 8], eax
mov eax, dword [edx - 4]
push eax
add ecx, ebx
push ecx
call fcn.0040f560
mov ebx, dword [esp + 0xa8]
mov edx, dword [esi]
push ebx
push edx
mov dword [esi + 0xc], eax
call fcn.0040f5e0
mov edi, dword [esp + 0x60]
mov ecx, ebx
shl eax, cl
push edi
mov dword [esp + 0x90], eax
mov eax, dword [esi + 4]
push eax
call fcn.0040f5e0
mov ecx, edi
shl eax, cl
mov ecx, dword [esi + 8]
push ebx
push ecx
mov dword [esp + 0xa8], eax
call fcn.0040f5c0
mov edx, dword [esp + 0x70]
mov edi, eax
mov eax, dword [esi + 0xc]
push edx
mov ecx, ebx
push eax
shl edi, cl
call fcn.0040f5c0
mov edx, dword [esp + 0x78]
mov ecx, edx
shl eax, cl
sub edi, dword [esp + 0xa4]
mov ecx, ebx
add esp, 0x40
sar edi, cl
mov ecx, dword [esp + 0x70]
mov dword [esi + 0x10], edi
sub eax, ecx
mov ecx, edx
sar eax, cl
mov dword [esi + 0x14], eax
imul eax, edi
imul eax, eax, 0x3480
push eax
call fcn.0041835e
mov ecx, dword [esi + 0x14]
mov edx, dword [esi + 0x10]
push ecx
push edx
mov dword [esi + 0x18], eax
call fcn.004107f0
mov ecx, dword [esi + 0x10]
mov dword [esi + 0x1c], eax
mov eax, dword [esi + 0x14]
push eax
push ecx
call fcn.004107f0
mov dword [esi + 0x20], eax
mov eax, dword [esi + 0x14]
imul eax, dword [esi + 0x10]
xor edx, edx
add esp, 0x14
test eax, eax
mov dword [esp + 0x1c], edx
jle 0x410162
mov ecx, ebx
mov edi, 1
shl edi, cl
mov ecx, dword [esp + 0x38]
mov eax, 1
shl eax, cl
mov dword [esp + 0x7c], edi
mov dword [esp + 0x50], edx
mov dword [esp + 0x10], eax
jmp 0x4100c5
mov edi, dword [esp + 0x7c]
mov eax, dword [esp + 0x1c]
mov ecx, dword [esi + 0x10]
cdq
idiv ecx
mov ecx, dword [esp + 0x50]
imul eax, dword [esp + 0x10]
imul edx, edi
add edx, dword [esp + 0x64]
mov edi, dword [esi + 0x18]
mov ebx, edx
mov edx, dword [esp + 0x70]
add edi, ecx
mov ecx, dword [esi]
push ecx
add eax, edx
push ebx
mov dword [esp + 0x44], eax
call fcn.0040f570
mov dword [edi], eax
mov edx, dword [esi + 4]
mov eax, dword [esp + 0x44]
push edx
push eax
call fcn.0040f570
mov edx, dword [esp + 0x8c]
mov dword [edi + 4], eax
mov ecx, dword [esi + 8]
push ecx
add ebx, edx
push ebx
call fcn.0040f560
mov edx, dword [esp + 0x28]
mov ecx, dword [esp + 0x54]
mov dword [edi + 8], eax
mov eax, dword [esi + 0xc]
push eax
add ecx, edx
push ecx
call fcn.0040f560
mov dword [edi + 0xc], eax
mov ecx, dword [esi + 0x14]
imul ecx, dword [esi + 0x10]
mov eax, dword [esp + 0x3c]
mov edi, dword [esp + 0x70]
add esp, 0x20
inc eax
add edi, 0x3480
cmp eax, ecx
mov dword [esp + 0x1c], eax
mov dword [esp + 0x50], edi
jl 0x4100c1
mov edx, dword [esp + 0x18]
mov ecx, dword [esp + 0x60]
mov eax, dword [esp + 0x14]
mov esi, dword [esp + 0xc]
add edx, 0x24
mov dword [esp + 0x18], edx
mov edx, dword [ecx + 0x14]
imul edx, dword [ecx + 0x10]
inc eax
cmp eax, edx
mov dword [esp + 0x14], eax
mov edi, ecx
jl 0x40ff55
mov ebx, dword [esp + 0x84]
mov eax, dword [esp + 0x28]
mov ecx, dword [edi + 0x18]
inc eax
add esi, 0x20
cmp eax, ecx
mov dword [esp + 0x28], eax
mov dword [esp + 0xc], esi
jl 0x40fd50
mov eax, dword [esp + 0x24]
mov ecx, dword [ebx + 0x10]
inc eax
cmp eax, ecx
mov dword [esp + 0x24], eax
jl 0x40fb98
mov edi, dword [esp + 0x8c]
mov esi, dword [ebp + 8]
mov ecx, dword [esp + 0x4c]
mov eax, dword [esp + 0x40]
mov ebx, dword [esp + 0x34]
mov edx, dword [esp + 0x30]
add ecx, 0x44c
inc eax
mov dword [esp + 0x4c], ecx
mov ecx, dword [edi + 0x10]
add ebx, 0x1c
add edx, 0x14
cmp eax, ecx
mov dword [esp + 0x40], eax
mov dword [esp + 0x34], ebx
mov dword [esp + 0x30], edx
jl 0x40fad0
mov ebx, dword [ebp + 0xc]
mov edx, dword [esp + 0x54]
mov ecx, dword [esp + 0x48]
mov eax, dword [esp + 0x44]
add edx, 0x398
add ecx, 0x18
mov dword [esp + 0x54], edx
mov edx, dword [ebx + 0x14]
mov dword [esp + 0x48], ecx
mov ecx, dword [ebx + 0x10]
imul edx, ecx
inc eax
cmp eax, edx
mov dword [esp + 0x44], eax
jl 0x40fa00
push 0x45be70
call fcn.0040f610
add esp, 4
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret