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

Disassembly:
sub esp, 0x3c
mov edx, dword [esp + 0x50]
fldz
mov ecx, dword [esp + 0x4c]
fst qword [esp + 0x34]
mov eax, dword [esp + 0x54]
fstp qword [esp + 0x2c]
push ebx
mov ebx, dword [esp + 0x5c]
push ebp
push esi
mov esi, edx
mov dword [esp + 0xc], edx
movzx edx, byte [esp + 0x94]
push edi
mov edi, ebx
mov dword [esp + 0x18], ebx
mov ebx, 1
sub ebx, edx
sub edi, eax
sub esi, ecx
mov edx, ebx
imul esi, edi
imul ebx, eax
mov edi, dword [esp + 0x6c]
imul edx, ecx
xor ebp, ebp
cmp dword [esp + 0x58], 1
mov dword [esp + 0x34], esi
mov dword [esp + 0x28], ebp
mov dword [esp + 0x20], ecx
mov dword [esp + 0x14], eax
mov dword [esp + 0x1c], edx
mov dword [esp + 0x30], ebx
jle 0x100313e6
mov eax, edi
imul eax, dword [esp + 0x70]
push 1
push eax
call fcn.1005993f
add esp, 8
mov dword [esp + 0x28], eax
cmp dword [esp + 0x58], ebp
jle 0x10031677
jmp 0x10031404
mov esi, dword [esp + 0x34]
mov ecx, dword [esp + 0x98]
fld dword [esp + 0x78]
push ecx
push esi
mov esi, dword [esp + 0x28]
lea edx, [esp + 0x44]
push edx
mov edx, dword [esp + 0x90]
lea ecx, [esp + 0x50]
push ecx
mov ecx, dword [esp + 0x90]
push edx
mov edx, dword [esp + 0x90]
push ecx
push edx
mov edx, dword [esp + 0x74]
push ecx
mov ecx, dword [esp + 0x94]
fstp dword [esp]
push ecx
mov ecx, dword [esp + 0x3c]
push edx
mov edx, dword [esp + 0x3c]
lea eax, [ebp + 1]
push eax
mov dword [esp + 0x64], eax
mov eax, dword [esp + 0x9c]
push eax
mov eax, dword [esp + 0x40]
push edi
push ecx
mov ecx, dword [esp + 0x8c]
push edx
mov edx, dword [esp + 0x8c]
push eax
push esi
push ecx
push edx
call fcn.10030a50
add esp, 0x4c
test ebp, ebp
jne 0x100314b3
mov eax, dword [esp + 0x98]
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x14]
push eax
mov eax, dword [esp + 0x14]
push edi
push ecx
mov ecx, dword [esp + 0x98]
push edx
mov edx, dword [esp + 0x98]
push eax
push esi
push ecx
push edx
jmp 0x1003155c
mov eax, ebx
sub eax, dword [esp + 0x14]
add eax, dword [esp + 0x18]
cmp ebx, eax
jge 0x10031536
mov ecx, dword [esp + 0x10]
sub ecx, esi
mov dword [esp + 0x2c], ecx
mov esi, ebx
imul esi, edi
add esi, dword [esp + 0x1c]
lea edx, [ebx + 5]
add esi, dword [esp + 0x28]
lea ecx, [edi + 0xa]
imul edx, ecx
add edx, dword [esp + 0x1c]
mov ecx, dword [esp + 0x8c]
lea edx, [edx + ecx + 5]
sub eax, ebx
mov dword [esp + 0x24], edx
mov ebx, eax
jmp 0x10031500
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x24]
push eax
push ecx
push esi
call fcn.100598df
mov edx, dword [esp + 0x38]
mov eax, dword [esp + 0x30]
push edx
push 0
push eax
call fcn.10059918
lea eax, [edi + 0xa]
add dword [esp + 0x3c], eax
add esp, 0x18
add esi, edi
sub ebx, 1
jne 0x10031500
mov esi, dword [esp + 0x20]
mov ecx, dword [esp + 0x98]
mov edx, dword [esp + 0x18]
mov eax, dword [esp + 0x14]
push ecx
mov ecx, dword [esp + 0x14]
push edi
push edx
mov edx, dword [esp + 0x98]
push eax
mov eax, dword [esp + 0x38]
push ecx
push esi
push edx
push eax
call fcn.10031030
mov eax, dword [esp + 0x78]
sub eax, ebp
lea ecx, [eax - 1]
mov edi, 1
shl edi, cl
mov ecx, eax
mov esi, 1
shl esi, cl
mov ecx, dword [esp + 0x7c]
lea eax, [edi + ecx - 1]
cdq
idiv esi
mov edx, ebp
shl edx, 4
sub edx, ebp
add esp, 0x20
mov ebx, eax
mov eax, dword [esp + 0x84]
lea ecx, [eax + edx*8]
mov edx, dword [esp + 0x60]
lea eax, [edi + edx - 1]
cdq
idiv esi
mov dword [ecx + 0x28], ebx
mov dword [ecx + 0x78], ebx
mov ebp, eax
mov eax, dword [esp + 0x64]
lea eax, [esi + eax - 1]
cdq
idiv esi
mov edx, dword [esp + 0x68]
mov dword [ecx + 0x2c], ebp
mov dword [ecx + 0x7c], ebp
mov dword [ecx + 0x30], eax
lea eax, [esi + edx - 1]
cdq
idiv esi
mov dword [ecx + 0x34], eax
mov eax, dword [esp + 0x5c]
lea eax, [esi + eax - 1]
cdq
idiv esi
mov edx, dword [esp + 0x60]
mov dword [ecx + 0x50], eax
lea eax, [esi + edx - 1]
cdq
idiv esi
mov dword [ecx + 0x54], eax
mov eax, dword [esp + 0x64]
lea eax, [edi + eax - 1]
cdq
idiv esi
mov edx, dword [esp + 0x68]
mov dword [esp + 0x2c], eax
mov dword [ecx + 0x58], eax
lea eax, [edi + edx - 1]
cdq
idiv esi
mov edx, dword [esp + 0x2c]
mov dword [ecx + 0x80], edx
mov esi, 1
mov dword [ecx + 0x5c], eax
mov dword [ecx + 0x84], eax
mov ecx, dword [esp + 0x38]
mov eax, dword [esp + 0x5c]
shl esi, cl
lea eax, [esi + eax - 1]
cdq
idiv esi
mov edx, dword [esp + 0x64]
mov dword [esp + 0x20], eax
lea eax, [esi + edx - 1]
cdq
idiv esi
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x60]
lea eax, [esi + eax - 1]
cdq
idiv esi
mov dword [esp + 0x10], eax
mov edx, dword [esp + 0x68]
lea eax, [esi + edx - 1]
cdq
idiv esi
mov edi, dword [esp + 0x6c]
mov ebx, dword [esp + 0x30]
mov ebp, ecx
cmp ebp, dword [esp + 0x58]
mov dword [esp + 0x18], eax
jl 0x10031400
mov eax, dword [esp + 0x28]
test eax, eax
je 0x10031688
push eax
call fcn.100598cb
add esp, 4
mov eax, dword [esp + 0x1c]
mov ebp, eax
sub ebp, dword [esp + 0x20]
mov esi, ebx
sub esi, dword [esp + 0x14]
add ebp, dword [esp + 0x10]
add esi, dword [esp + 0x18]
cmp ebp, eax
jne 0x100316a7
lea ebp, [eax + 1]
cmp esi, ebx
jne 0x100316ae
lea esi, [ebx + 1]
fldz
mov ecx, dword [esp + 0x74]
fcomp dword [esp + 0x78]
mov edx, dword [esp + 0x84]
mov dword [edx + 0x20], ecx
mov dword [edx + 0x24], ecx
fnstsw ax
fld1
test ah, 0x44
jp 0x100316d2
fld1
jmp 0x1003171a
mov eax, dword [esp + 0x7c]
sub ecx, dword [eax]
jne 0x100316de
fld1
jmp 0x10031701
test ecx, ecx
mov eax, 1
jge 0x100316f7
neg ecx
shl eax, cl
mov dword [esp + 0x58], eax
fild dword [esp + 0x58]
fdivr st(1)
jmp 0x10031701
shl eax, cl
mov dword [esp + 0x58], eax
fild dword [esp + 0x58]
mov ecx, dword [esp + 0x80]
fstp dword [esp + 0x58]
fild dword [ecx]
fmul qword [0x1008aec8]
fadd st(1)
fmul dword [esp + 0x58]
cmp ebx, esi
fstp dword [esp + 0x58]
fld dword [esp + 0x58]
fst dword [edx + 0x18]
fdivp st(1)
fstp dword [esp + 0x58]
fldz
jge 0x100317b9
mov ecx, dword [esp + 0x50]
fld dword [esp + 0x58]
lea eax, [edi + 0xa]
imul eax, ebx
add eax, dword [esp + 0x8c]
lea edx, [edi + edi*4 + 0x37]
add edx, eax
mov eax, ebx
imul eax, edi
add eax, dword [esp + 0x1c]
sub esi, ebx
lea ecx, [ecx + eax*4]
mov dword [esp + 0x98], ecx
mov eax, dword [esp + 0x1c]
cmp eax, ebp
jge 0x1003178f
fld dword [ecx]
add eax, 1
fmul st(1)
add ecx, 4
cmp eax, ebp
fstp dword [esp + 0x58]
fld dword [esp + 0x58]
fst dword [ecx - 4]
mov byte [edx + eax - 1], 0x7f
fmul st(0), st(0)
faddp st(2)
jl 0x1003176d
mov ecx, dword [esp + 0x98]
lea eax, [edi + 0xa]
add edx, eax
lea eax, [edi*4]
add ecx, eax
sub esi, 1
mov dword [esp + 0x98], ecx
jne 0x10031765
mov edx, dword [esp + 0x84]
fstp st(0)
mov eax, dword [esp + 0x50]
imul ebx, edi
fstp dword [edx + 0x1c]
add ebx, dword [esp + 0x1c]
pop edi
lea ecx, [eax + ebx*4]
mov eax, dword [esp + 0x1c]
mov dword [edx + 0x14], ecx
mov ecx, dword [esp + 0xc]
pop esi
mov dword [edx], eax
mov eax, dword [esp + 0xc]
mov dword [edx + 4], ecx
mov ecx, dword [esp + 0x10]
pop ebp
mov dword [edx + 8], eax
mov dword [edx + 0xc], ecx
pop ebx
add esp, 0x3c
ret