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

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0xdc
mov ebp, eax
mov dword [esp + 0x44], edx
mov dword [esp + 0x28], ecx
mov eax, dword [esp + 0xf0]
mov dword [esp + 0x48], eax
mov eax, dword [esp + 0xf4]
mov dword [esp + 0x60], eax
mov eax, dword [ebp + 0x468]
mov dword [esp + 0x30], eax
fld qword [0x464b80]
fild dword [0x464b7c]
fld st(0)
fmul st(2)
fnstcw word [esp + 0x8e]
mov ax, word [esp + 0x8e]
or ah, 0xc
mov word [esp + 0x8c], ax
fldcw word [esp + 0x8c]
fistp dword [esp + 0x38]
fldcw word [esp + 0x8e]
mov ebx, dword [esp + 0x38]
fld st(1)
fmul dword [0x467ce8]
fldcw word [esp + 0x8c]
fistp dword [esp + 0x38]
fldcw word [esp + 0x8e]
mov eax, dword [esp + 0x38]
add ebx, eax
cmp ecx, ebx
jb 0x403270
mov eax, ecx
xor edx, edx
div ebx
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0x48]
mov edi, dword [esp + 0x60]
sub eax, edi
mov dword [esp + 0x40], eax
mov eax, dword [ebp + 0x454]
mov dword [esp + 0x38], eax
lea esi, [ebp + 0x40]
mov dword [esp + 0x4c], esi
mov ecx, 8
lea edi, [esp + 0xb0]
rep movsd dword es:[edi], dword [esi]
shr byte [esp + 0xb8], 1
shr byte [esp + 0xb9], 1
shr byte [esp + 0xba], 1
test eax, eax
je 0x402f10
mov edi, dword [esp + 0x28]
cmp dword [eax + 8], edi
je 0x403540
fstp st(0)
fstp st(0)
jmp 0x402ee4
fstp st(0)
fstp st(0)
mov eax, dword [esp + 0x38]
mov eax, dword [eax]
test eax, eax
je 0x402ef6
mov dword [esp], eax
call sub.msvcrt.dll_free
mov eax, dword [esp + 0x38]
mov dword [esp], eax
call sub.msvcrt.dll_free
jmp 0x402f14
fstp st(0)
fstp st(0)
mov ecx, 1
mov edx, dword [esp + 0x48]
mov eax, dword [esp + 0x28]
call fcn.00412a50
mov edi, eax
mov dword [esp + 0x38], eax
mov dword [ebp + 0x454], eax
mov eax, dword [ebp + 0x418]
test eax, eax
je 0x402f46
cmp dword [eax + 4], 0xa
je 0x403290
fld qword [0x464b80]
fild dword [0x464b7c]
fld st(0)
fmul st(2)
fnstcw word [esp + 0x8e]
mov ax, word [esp + 0x8e]
or ah, 0xc
mov word [esp + 0x8c], ax
fldcw word [esp + 0x8c]
fistp dword [esp + 0x3c]
fldcw word [esp + 0x8e]
mov ecx, dword [esp + 0x3c]
fld st(1)
fmul dword [0x467ce8]
fldcw word [esp + 0x8c]
fistp dword [esp + 0x3c]
fldcw word [esp + 0x8e]
mov eax, dword [esp + 0x3c]
add ecx, eax
mov eax, dword [esp + 0x28]
cmp eax, ecx
jb 0x403280
xor edx, edx
div ecx
mov ebx, eax
mov eax, dword [esp + 0x40]
xor edx, edx
div ecx
inc eax
imul eax, ebx
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0x38]
mov edx, dword [eax + 0xc]
mov eax, dword [eax + 8]
fstp qword [esp + 0x58]
fstp qword [esp + 0x50]
dec edx
mov dword [esp + 8], edx
dec eax
mov dword [esp + 4], eax
mov dword [esp], 0
xor ecx, ecx
mov edx, dword [esp + 0x4c]
mov eax, dword [esp + 0x38]
call fcn.00416c20
mov eax, dword [esp + 0x44]
mov ebx, dword [eax + 8]
mov dword [ebp + 0x468], 0
xor eax, eax
mov edx, dword [esp + 0x30]
test edx, edx
fld qword [esp + 0x50]
fld qword [esp + 0x58]
jle 0x4033e0
mov edx, dword [esp + 0x30]
jmp 0x403042
mov ebx, dword [ebx + 8]
inc dword [ebp + 0x468]
inc eax
cmp edx, eax
je 0x4033e0
mov edi, dword [ebx + 0xc]
test edi, edi
jne 0x403030
fmul st(1)
fnstcw word [esp + 0x8e]
mov ax, word [esp + 0x8e]
or ah, 0xc
mov word [esp + 0x8c], ax
fldcw word [esp + 0x8c]
fistp dword [esp + 0x30]
fldcw word [esp + 0x8e]
mov edi, dword [esp + 0x30]
fld st(0)
fmul dword [0x467ce8]
fldcw word [esp + 0x8c]
fistp dword [esp + 0x30]
fldcw word [esp + 0x8e]
mov eax, dword [esp + 0x30]
add eax, edi
mov dword [esp + 0x50], eax
cmp dword [ebp + 0x2c], 3
je 0x4034e7
fmul dword [0x467cec]
fldcw word [esp + 0x8c]
fistp dword [esp + 0x84]
fldcw word [esp + 0x8e]
mov eax, dword [esp + 0x28]
xor edx, edx
div dword [esp + 0x50]
mov dword [esp + 0x4c], eax
test eax, eax
jg 0x4030de
mov dword [esp + 0x4c], 1
mov eax, dword [esp + 0x28]
xor edx, edx
div dword [esp + 0x4c]
mov dword [esp + 0x78], eax
mov ecx, dword [esp + 0x3c]
test ecx, ecx
jle 0x403500
mov dword [esp + 0x44], 0
mov dword [esp + 0x7c], 0
mov dword [esp + 0x68], 0
mov dword [esp + 0x58], 0
fld1
fstp qword [esp + 0x70]
mov edx, dword [ebx + 0xc]
test edx, edx
je 0x403500
mov esi, dword [ebx]
mov edx, dword [esi + 0x28]
mov eax, dword [ebp + 0x470]
call fcn.0040f5c0
mov dword [esp + 0x40], eax
mov ecx, dword [ebp + 0x2c]
cmp ecx, 3
je 0x4032a0
mov esi, dword [esp + 0x40]
test esi, esi
je 0x4034d0
mov eax, dword [esp + 0x44]
cdq
idiv dword [esp + 0x4c]
mov dword [esp + 0x80], edx
mov dword [esp + 0x64], eax
test ecx, ecx
je 0x403570
lea eax, [ecx - 1]
cmp eax, 1
ja 0x4034d0
mov dword [esp + 0x98], edi
mov dword [esp + 0x9c], edi
mov esi, dword [esp + 0x40]
mov eax, dword [esi + 0xc]
mov edx, dword [esi + 8]
mov esi, edi
imul esi, edx
mov dword [esp + 0x88], esi
mov esi, edi
imul esi, eax
cmp dword [esp + 0x88], esi
jg 0x403650
cmp ecx, 2
je 0x4039d0
sub eax, edx
mov ecx, eax
shr ecx, 0x1f
add ecx, eax
sar ecx, 1
mov eax, edx
xor edx, edx
mov dword [esp + 0xa8], eax
mov dword [esp + 0xac], eax
mov dword [esp + 0xa0], edx
mov dword [esp + 0xa4], ecx
mov esi, dword [esp + 0x78]
mov eax, esi
sub eax, edi
mov edx, eax
shr edx, 0x1f
add edx, eax
sar edx, 1
mov eax, dword [esp + 0x80]
imul eax, esi
add edx, eax
mov dword [esp + 0x90], edx
mov eax, dword [esp + 0x64]
mov esi, dword [esp + 0x50]
imul eax, esi
mov esi, dword [esp + 0x30]
add eax, esi
mov esi, dword [esp + 0x60]
add eax, esi
mov dword [esp + 0x94], eax
cmp byte [ebp + 0x19], 0
jne 0x40382c
lea eax, [esp + 0x90]
mov dword [esp], eax
mov ecx, dword [esp + 0x38]
lea edx, [esp + 0xa0]
mov eax, dword [esp + 0x40]
call fcn.00429ba0
mov eax, dword [ebp + 0x2c]
mov dword [esp + 0x64], 0
jmp 0x403602
mov dword [esp + 0x3c], 1
jmp 0x402e86
mov ebx, 1
jmp 0x402fb8
mov eax, dword [eax + 0x74]
mov dword [eax], edi
jmp 0x402f46
mov eax, dword [esi + 0x30]
imul eax, edi
cdq
idiv dword [esi + 0x34]
mov esi, dword [esp + 0x30]
add eax, esi
mov dword [esp + 0x64], eax
mov edx, dword [esp + 0x58]
test edx, edx
je 0x403770
fld qword [esp + 0x70]
fimul dword [esp + 0x64]
fstp qword [esp]
call fcn.00454218
fisub dword [esp + 0x30]
fnstcw word [esp + 0x8e]
mov ax, word [esp + 0x8e]
or ah, 0xc
mov word [esp + 0x8c], ax
fldcw word [esp + 0x8c]
fistp dword [esp + 0x64]
fldcw word [esp + 0x8e]
cmp dword [esp + 0x58], 1
je 0x403740
mov eax, dword [esp + 0x40]
test eax, eax
je 0x403820
mov eax, dword [esp + 0x64]
mov dword [esp + 0x98], eax
mov dword [esp + 0x9c], edi
mov esi, dword [esp + 0x40]
mov ecx, dword [esi + 0xc]
mov esi, dword [esi + 8]
mov edx, edi
imul edx, esi
imul eax, ecx
cmp edx, eax
jg 0x403630
mov eax, edx
cdq
idiv dword [esp + 0x64]
mov dword [esp + 0x80], eax
sub ecx, eax
mov edx, ecx
shr edx, 0x1f
lea edx, [edx + ecx]
sar edx, 1
mov eax, esi
mov ecx, dword [esp + 0x80]
xor esi, esi
mov dword [esp + 0xa8], eax
mov dword [esp + 0xac], ecx
mov dword [esp + 0xa0], esi
mov dword [esp + 0xa4], edx
mov eax, dword [esp + 0x68]
mov dword [esp + 0x90], eax
mov eax, dword [esp + 0x7c]
dec eax
mov esi, dword [esp + 0x50]
imul eax, esi
mov esi, dword [esp + 0x60]
add eax, esi
mov dword [esp + 0x94], eax
cmp byte [ebp + 0x19], 0
jne 0x403881
lea eax, [esp + 0x90]
mov dword [esp], eax
mov ecx, dword [esp + 0x38]
lea edx, [esp + 0xa0]
mov eax, dword [esp + 0x40]
call fcn.00429ba0
mov eax, dword [ebp + 0x2c]
jmp 0x403602
fmul st(1)
fnstcw word [esp + 0x8e]
mov ax, word [esp + 0x8e]
or ah, 0xc
mov word [esp + 0x8c], ax
fldcw word [esp + 0x8c]
fistp dword [esp + 0x30]
fldcw word [esp + 0x8e]
mov edi, dword [esp + 0x30]
fld st(0)
fmul dword [0x467ce8]
fldcw word [esp + 0x8c]
fistp dword [esp + 0x30]
fldcw word [esp + 0x8e]
mov eax, dword [esp + 0x30]
add eax, edi
mov dword [esp + 0x50], eax
cmp dword [ebp + 0x2c], 3
jne 0x4030a9
mov eax, dword [esp + 0x40]
xor edx, edx
div dword [esp + 0x50]
inc eax
mov dword [esp + 0x44], eax
mov esi, dword [ebx + 0xc]
test esi, esi
je 0x4034eb
mov edx, dword [ebx]
test eax, eax
je 0x4034f0
mov ecx, ebx
mov dword [esp + 0x3c], 0
xor esi, esi
mov dword [esp + 0x40], 0
mov dword [esp + 0x4c], ebx
mov ebx, edx
nop
mov eax, edi
imul eax, dword [ebx + 0x30]
cdq
idiv dword [ebx + 0x34]
mov edx, dword [esp + 0x30]
add eax, edx
add esi, eax
inc dword [esp + 0x3c]
cmp dword [esp + 0x28], esi
jg 0x4036d0
inc dword [esp + 0x40]
mov eax, dword [esp + 0x40]
mov esi, dword [esp + 0x44]
cmp eax, esi
jae 0x4036ea
mov ecx, dword [ecx + 8]
mov eax, dword [ecx + 0xc]
test eax, eax
je 0x4036ea
mov ebx, dword [ecx]
xor esi, esi
jmp 0x403480
mov ebx, dword [ebx + 8]
inc dword [esp + 0x44]
mov eax, dword [esp + 0x44]
cmp dword [esp + 0x3c], eax
jne 0x40311e
jmp 0x403500
fstp st(0)
jmp 0x403500
fstp st(0)
jmp 0x403500
fstp st(0)
lea esi, [esi]
lea esi, [esi]
mov eax, dword [ebp + 0x3f8]
test eax, eax
je 0x403927
lea edx, [ebp + 0x3fc]
mov dword [esp + 0xf4], 0x88
mov dword [esp + 0xf0], 0
mov ecx, dword [esp + 0x38]
add esp, 0xdc
pop ebx
pop esi
pop edi
pop ebp
jmp fcn.004190f0
mov edi, dword [esp + 0x48]
cmp dword [eax + 0xc], edi
jne 0x402ee0
mov eax, dword [esp + 0x40]
xor edx, edx
div ebx
inc eax
mov edi, dword [esp + 0x3c]
imul edi, eax
mov dword [esp + 0x3c], edi
mov eax, dword [esp + 0x28]
mov edx, dword [esp + 0x48]
jmp 0x402fd2
mov eax, dword [esp + 0x40]
mov edx, dword [eax + 0xc]
mov eax, dword [eax + 8]
lea esi, [esp + 0xa0]
mov dword [esp + 4], esi
mov dword [esp], edi
mov ecx, edi
call fcn.0040f030
mov ecx, dword [esp + 0x78]
mov edx, ecx
sub edx, edi
mov eax, edx
shr eax, 0x1f
add eax, edx
sar eax, 1
mov edx, dword [esp + 0x80]
imul edx, ecx
add eax, edx
add eax, dword [esp + 0xa0]
mov dword [esp + 0xa0], eax
mov edx, dword [esp + 0x64]
mov ecx, dword [esp + 0x50]
imul edx, ecx
mov ecx, dword [esp + 0x30]
add edx, ecx
mov ecx, dword [esp + 0x60]
add edx, ecx
add edx, dword [esp + 0xa4]
mov dword [esp + 0xa4], edx
cmp byte [ebp + 0x19], 0
jne 0x403662
mov dword [esp], esi
mov ecx, dword [esp + 0x38]
xor edx, edx
mov eax, dword [esp + 0x40]
call fcn.00429ba0
mov eax, dword [ebp + 0x2c]
mov dword [esp + 0x64], 0
mov ebx, dword [ebx + 8]
cmp eax, 3
jne 0x4034d3
dec dword [esp + 0x58]
mov eax, dword [esp + 0x64]
mov ecx, dword [esp + 0x30]
add eax, ecx
add dword [esp + 0x68], eax
jmp 0x4034d3
cdq
idiv edi
sub esi, eax
mov edx, esi
shr edx, 0x1f
add esi, edx
sar esi, 1
xor edx, edx
jmp 0x403368
sub edx, eax
mov ecx, edx
shr ecx, 0x1f
add edx, ecx
sar edx, 1
xor ecx, ecx
jmp 0x4031cb
mov ecx, dword [esp + 0x84]
add edx, ecx
add eax, ecx
mov ecx, dword [esp + 0xac]
add ecx, edx
mov dword [esp + 0x64], ecx
fild dword [esp + 0x64]
fstp qword [esp + 0x18]
mov ecx, dword [esp + 0xa8]
add ecx, eax
mov dword [esp + 0x64], ecx
fild dword [esp + 0x64]
fstp qword [esp + 0x10]
mov dword [esp + 0x64], edx
fild dword [esp + 0x64]
fstp qword [esp + 8]
mov dword [esp + 0x64], eax
fild dword [esp + 0x64]
fstp qword [esp]
lea edx, [esp + 0xb0]
mov eax, dword [esp + 0x38]
call fcn.00416e20
jmp 0x4035e5
mov ecx, dword [ecx + 8]
mov ebx, dword [ecx + 0xc]
test ebx, ebx
je 0x4036ea
mov ebx, dword [ecx]
mov edx, dword [esp + 0x44]
cmp dword [esp + 0x40], edx
jb 0x403480
mov ebx, dword [esp + 0x4c]
fmul dword [0x467cec]
fldcw word [esp + 0x8c]
fistp dword [esp + 0x84]
fldcw word [esp + 0x8e]
mov eax, dword [esp + 0x28]
xor edx, edx
div dword [esp + 0x50]
mov dword [esp + 0x4c], eax
test eax, eax
jg 0x403723
mov dword [esp + 0x4c], 1
mov eax, dword [esp + 0x28]
xor edx, edx
div dword [esp + 0x4c]
mov dword [esp + 0x78], eax
jmp 0x4030f8
mov eax, dword [ebx + 8]
cmp dword [eax + 0xc], 9
je 0x403902
mov edx, dword [esp + 0x40]
test edx, edx
jne 0x403317
mov ebx, eax
mov dword [esp + 0x58], 0
jmp 0x403612
cmp dword [esp + 0x28], eax
jle 0x4039d7
mov esi, eax
mov ecx, ebx
mov eax, 1
mov dword [esp + 0x68], ebx
mov ebx, eax
mov dword [esp + 0x70], ebp
mov eax, dword [esp + 0x30]
mov dword [esp + 0x58], eax
jmp 0x4037bd
mov edx, dword [ecx]
mov eax, dword [edx + 0x30]
imul eax, edi
mov ebp, edx
cdq
idiv dword [ebp + 0x34]
mov edx, dword [esp + 0x58]
add eax, edx
add esi, eax
inc ebx
cmp dword [esp + 0x28], esi
jle 0x4037c7
mov ecx, dword [ecx + 8]
mov ebp, dword [ecx + 0xc]
test ebp, ebp
jne 0x4037a0
mov dword [esp + 0x58], ebx
mov ebx, dword [esp + 0x68]
mov ebp, dword [esp + 0x70]
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x30]
sub eax, ecx
cmp eax, esi
jge 0x4038f7
mov dword [esp + 0x68], eax
mov dword [esp + 0x6c], 0
fild qword [esp + 0x68]
mov dword [esp + 0x68], esi
fidiv dword [esp + 0x68]
fstp qword [esp + 0x70]
inc dword [esp + 0x7c]
mov eax, dword [esp + 0x30]
mov dword [esp + 0x68], eax
jmp 0x4032c0
mov ebx, dword [ebx + 8]
dec dword [esp + 0x58]
jmp 0x403612
mov esi, dword [esp + 0x84]
add eax, esi
add edx, esi
lea ecx, [edi + eax]
mov dword [esp + 0x64], ecx
fild dword [esp + 0x64]
fstp qword [esp + 0x18]
lea ecx, [edi + edx]
mov dword [esp + 0x64], ecx
fild dword [esp + 0x64]
fstp qword [esp + 0x10]
mov dword [esp + 0x64], eax
fild dword [esp + 0x64]
fstp qword [esp + 8]
mov dword [esp + 0x64], edx
fild dword [esp + 0x64]
fstp qword [esp]
lea edx, [esp + 0xb0]
mov eax, dword [esp + 0x38]
call fcn.00416e20
jmp 0x403233
mov esi, dword [esp + 0x84]
add eax, esi
mov ecx, dword [esp + 0x68]
lea edx, [ecx + esi]
lea ecx, [edi + eax]
mov dword [esp + 0x80], ecx
fild dword [esp + 0x80]
fstp qword [esp + 0x18]
mov esi, dword [esp + 0x64]
lea ecx, [esi + edx]
mov dword [esp + 0x80], ecx
fild dword [esp + 0x80]
fstp qword [esp + 0x10]
mov dword [esp + 0x80], eax
fild dword [esp + 0x80]
fstp qword [esp + 8]
mov dword [esp + 0x80], edx
fild dword [esp + 0x80]
fstp qword [esp]
lea edx, [esp + 0xb0]
mov eax, dword [esp + 0x38]
call fcn.00416e20
jmp 0x4033b2
fld1
fstp qword [esp + 0x70]
jmp 0x403801
mov edx, dword [esp + 0x28]
mov esi, dword [esp + 0x30]
sub edx, esi
mov esi, dword [esp + 0x68]
sub edx, esi
mov dword [esp + 0x64], edx
mov ecx, dword [esp + 0x40]
test ecx, ecx
jne 0x403317
jmp 0x403759
mov dword [esp + 0x2c], 0
fild qword [esp + 0x28]
fldz
fst qword [esp + 0x18]
fxch st(1)
fst qword [esp + 0x10]
fstp qword [esp + 0x30]
fst qword [esp + 8]
fstp qword [esp]
lea edx, [esp + 0xb0]
mov edi, dword [esp + 0x38]
mov eax, edi
call fcn.0040f7a0
mov ebx, dword [esp + 0x48]
mov dword [esp + 0x28], ebx
mov dword [esp + 0x2c], 0
fild qword [esp + 0x28]
fstp qword [esp + 0x18]
fldz
fst qword [esp + 0x10]
fst qword [esp + 8]
fstp qword [esp]
lea edx, [esp + 0xb0]
mov eax, edi
call fcn.0040f7a0
lea eax, [ebx - 1]
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], 0
fild qword [esp + 0x28]
fst qword [esp + 0x18]
fld qword [esp + 0x30]
fstp qword [esp + 0x10]
fstp qword [esp + 8]
fldz
fstp qword [esp]
lea edx, [esp + 0xb0]
mov eax, edi
call fcn.0040f7a0
add esp, 0xdc
pop ebx
pop esi
pop edi
pop ebp
ret
xor ecx, ecx
jmp 0x4031c7
mov esi, dword [esp + 0x64]
mov dword [esp + 0x58], 1
jmp 0x4037d3