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

Disassembly:
sub esp, 0x4c
mov eax, dword [esp + 0x50]
mov ecx, dword [eax + 8]
push ebx
push ebp
mov ebp, dword [eax + 0x130]
push esi
xor esi, esi
cmp ecx, esi
push edi
mov edi, dword [eax + 0xc]
mov dword [esp + 0x48], ebp
mov dword [esp + 0x18], esi
je 0x40d858
mov eax, edi
cdq
idiv ecx
push edx
push ecx
call fcn.0040d800
add esp, 8
mov ecx, eax
jmp 0x40d85a
mov ecx, edi
mov eax, edi
cdq
idiv ecx
mov ebx, eax
cmp ebx, 0x140
mov dword [esp + 0x28], eax
jle 0x40d876
mov ebx, 0x140
mov dword [esp + 0x28], ebx
fld dword [ebp + 0x7ca8]
sub esp, 8
fst qword [esp + 0x5c]
fadd qword [0x4459d0]
fstp qword [esp]
call fcn.004293c0
fld qword [esp + 0x5c]
add esp, 8
fld st(0)
mov dword [esp + 0x60], 1
fsubrp st(2)
fxch st(1)
fabs
fcomp qword [0x44d458]
fnstsw ax
test ah, 5
jnp 0x40d8b9
mov dword [esp + 0x60], esi
fild dword [esp + 0x60]
fstp dword [esp + 0x60]
fld1
fdivrp st(1)
fstp dword [esp + 0x1c]
fld1
fcom dword [esp + 0x1c]
fnstsw ax
test ah, 5
jp 0x40d8dc
fstp dword [esp + 0x1c]
jmp 0x40d8de
fstp st(0)
fld dword [esp + 0x60]
fadd dword [0x44d450]
call fcn.00426db0
cmp dword [ebp + 0xc], esi
lea edi, [eax + 1]
mov dword [esp + 0x14], eax
mov dword [esp + 0x44], edi
jne 0x40daa8
push 4
push edi
call fcn.00428d5e
push 4
push edi
mov dword [ebp + 0xd1ec], eax
call fcn.00428d5e
mov dword [ebp + 0xd1f0], eax
lea eax, [ebx + ebx]
add esp, 0x10
cmp eax, esi
mov dword [esp + 0x40], eax
jl 0x40d94f
add eax, 1
lea esi, [ebp + 0xd1f4]
mov dword [esp + 0x60], eax
push 4
push edi
call fcn.00428d5e
mov dword [esi], eax
add esp, 8
add esi, 4
sub dword [esp + 0x60], 1
jne 0x40d938
fldz
mov eax, dword [esp + 0x40]
test eax, eax
fst dword [ebp + 0xdbf8]
fst dword [ebp + 0xdbfc]
mov dword [esp + 0x18], 0
jl 0x40da9f
fild dword [esp + 0x28]
neg ebx
add eax, 1
lea ecx, [ebp + 0xd1f4]
fadd st(0), st(0)
mov dword [esp + 0x24], ebx
mov dword [esp + 0x60], ecx
mov dword [esp + 0x40], eax
fstp qword [esp + 0x54]
mov dword [esp + 0x18], eax
fst dword [esp + 0x10]
xor esi, esi
cmp dword [esp + 0x14], esi
fild dword [esp + 0x24]
mov dword [esp + 0x20], esi
fdiv qword [esp + 0x54]
fstp dword [esp + 0x3c]
jl 0x40da11
mov edx, dword [esp + 0x60]
fstp st(0)
fld dword [esp + 0x3c]
mov ebx, dword [edx]
fstp qword [esp + 0x4c]
mov eax, dword [esp + 0x14]
fld dword [esp + 0x1c]
push eax
sub esp, 8
fstp dword [esp + 4]
fild dword [esp + 0x2c]
fsub qword [esp + 0x58]
fstp dword [esp + 0x48]
fld dword [esp + 0x48]
fstp dword [esp]
call fcn.0040d6f0
fstp dword [esp + 0x48]
add esi, 1
fld dword [esp + 0x48]
add esp, 0xc
fst dword [ebx]
add ebx, 4
cmp esi, dword [esp + 0x14]
fadd dword [esp + 0x10]
mov dword [esp + 0x20], esi
fstp dword [esp + 0x10]
jle 0x40d9c2
fldz
fld dword [esp + 0x10]
mov esi, dword [esp + 0x14]
xor edx, edx
cmp edi, 4
jl 0x40da62
mov ecx, dword [esp + 0x60]
fld st(0)
mov eax, dword [ecx]
lea ecx, [esi + 1]
add eax, 8
shr ecx, 2
lea edx, [ecx*4]
fld dword [eax - 8]
add eax, 0x10
sub ecx, 1
fdiv st(1)
fstp dword [eax - 0x18]
fld dword [eax - 0x14]
fdiv st(1)
fstp dword [eax - 0x14]
fld dword [eax - 0x10]
fdiv st(1)
fstp dword [eax - 0x10]
fld dword [eax - 0xc]
fdiv st(1)
fstp dword [eax - 0xc]
jne 0x40da38
fstp st(0)
cmp edx, esi
jg 0x40da85
mov eax, dword [esp + 0x60]
mov ecx, dword [eax]
mov eax, esi
sub eax, edx
lea ecx, [ecx + edx*4]
add eax, 1
fld dword [ecx]
add ecx, 4
sub eax, 1
fdiv st(1)
fstp dword [ecx - 4]
jne 0x40da76
add dword [esp + 0x60], 4
fstp st(0)
mov eax, 1
add dword [esp + 0x24], eax
sub dword [esp + 0x40], eax
jne 0x40d996
fstp st(0)
mov dword [ebp + 0xc], 1
cmp dword [esp + 0x68], 0
mov edx, dword [esp + 0x78]
mov esi, dword [ebp + edx*4 + 0xd1ec]
mov ebx, dword [esp + 0x6c]
mov dword [esp + 0x1c], 0
jle 0x40dd63
mov ecx, dword [esp + 0x14]
mov eax, ecx
cdq
sub eax, edx
sar eax, 1
sub ecx, eax
mov dword [esp + 0x40], eax
mov dword [esp + 0x4c], ecx
nop
fild dword [esp + 0x1c]
mov eax, dword [esp + 0x78]
sub esp, 8
fmul dword [ebp + 0x7ca8]
fstp dword [esp + 0x68]
fld dword [esp + 0x68]
fsub dword [ebp + eax*4 + 0xdbf8]
fst qword [esp + 0x5c]
fstp qword [esp]
call fcn.004293c0
add esp, 8
call fcn.00426db0
mov ecx, dword [esp + 0x4c]
add ecx, eax
cmp ecx, dword [esp + 0x70]
mov dword [esp + 0x18], eax
jge 0x40dd63
mov edx, dword [esp + 0x14]
fild dword [esp + 0x28]
and edx, 0x80000001
jns 0x40db3d
dec edx
or edx, 0xfffffffe
inc edx
mov dword [esp + 0x60], edx
fild dword [esp + 0x60]
sub esp, 8
fld qword [0x4459d0]
fmul st(1), st(0)
fild dword [esp + 0x20]
faddp st(2)
fld qword [esp + 0x5c]
fsubrp st(2)
fxch st(1)
fstp dword [esp + 0x68]
fld dword [esp + 0x68]
fadd st(0), st(0)
fmul st(2)
faddp st(2)
faddp st(1)
fstp qword [esp]
call fcn.004293c0
add esp, 8
call fcn.00426db0
fldz
xor ecx, ecx
fstp dword [esp + 0x10]
cmp edi, 4
mov dword [esp + 0x54], eax
jl 0x40dccc
mov ecx, dword [esp + 0x18]
sub ecx, dword [esp + 0x40]
mov edx, dword [ebp + eax*4 + 0xd1f4]
lea ebp, [ebx + ecx*4 + 0xc]
lea eax, [ebx + ecx*4]
mov edi, ecx
lea ecx, [ebx + ecx*4 + 8]
mov ebx, dword [esp + 0x18]
mov dword [esp + 0x34], ecx
lea ecx, [eax + 4]
mov dword [esp + 0x2c], ecx
mov ecx, dword [esp + 0x44]
sub ecx, dword [esp + 0x40]
mov dword [esp + 0x3c], ebp
add ecx, ebx
lea ebp, [esi + ecx*4 + 0xc]
lea ebx, [esi + ecx*4]
lea ecx, [esi + ecx*4 + 8]
mov dword [esp + 0x30], ecx
lea ecx, [ebx + 4]
mov dword [esp + 0x24], ecx
mov ecx, dword [esp + 0x14]
add ecx, 1
add edx, 8
shr ecx, 2
mov dword [esp + 0x38], ebp
lea ebp, [ecx*4]
mov dword [esp + 0x20], ebp
mov edi, edi
test edi, edi
jge 0x40dc08
fld dword [ebx]
jmp 0x40dc0a
fld dword [eax]
cmp edi, 0xffffffff
fstp dword [esp + 0x60]
fld dword [edx - 8]
mov ebp, dword [esp + 0x24]
fmul dword [esp + 0x60]
fadd dword [esp + 0x10]
fstp dword [esp + 0x10]
jl 0x40dc2a
mov ebp, dword [esp + 0x2c]
cmp edi, 0xfffffffe
fld dword [ebp]
mov ebp, dword [esp + 0x30]
fstp dword [esp + 0x60]
fld dword [edx - 4]
fmul dword [esp + 0x60]
fadd dword [esp + 0x10]
fstp dword [esp + 0x10]
jl 0x40dc4d
mov ebp, dword [esp + 0x34]
cmp edi, 0xfffffffd
fld dword [ebp]
mov ebp, dword [esp + 0x38]
fstp dword [esp + 0x60]
fld dword [edx]
fmul dword [esp + 0x60]
fadd dword [esp + 0x10]
fstp dword [esp + 0x10]
jl 0x40dc6f
mov ebp, dword [esp + 0x3c]
fld dword [ebp]
add dword [esp + 0x24], 0x10
add dword [esp + 0x2c], 0x10
fstp dword [esp + 0x60]
fld dword [edx + 4]
add dword [esp + 0x30], 0x10
fmul dword [esp + 0x60]
add dword [esp + 0x34], 0x10
add dword [esp + 0x38], 0x10
add dword [esp + 0x3c], 0x10
fadd dword [esp + 0x10]
add edx, 0x10
add ebx, 0x10
add eax, 0x10
add edi, 4
fstp dword [esp + 0x10]
sub ecx, 1
jne 0x40dc00
mov ebp, dword [esp + 0x48]
mov edi, dword [esp + 0x44]
mov eax, dword [esp + 0x54]
mov ecx, dword [esp + 0x20]
mov ebx, dword [esp + 0x6c]
cmp ecx, dword [esp + 0x14]
jg 0x40dd43
mov edx, dword [ebp + eax*4 + 0xd1f4]
lea eax, [edx + ecx*4]
mov edx, dword [esp + 0x18]
mov dword [esp + 0x38], eax
mov eax, ecx
sub eax, dword [esp + 0x40]
add edx, eax
add eax, edi
add eax, dword [esp + 0x18]
lea ebp, [ebx + edx*4]
mov dword [esp + 0x3c], ebp
lea ebp, [esi + eax*4]
mov eax, dword [esp + 0x14]
sub eax, ecx
add eax, 1
test edx, edx
jge 0x40dd0e
fld dword [ebp]
jmp 0x40dd14
mov ecx, dword [esp + 0x3c]
fld dword [ecx]
mov ecx, dword [esp + 0x38]
fstp dword [esp + 0x60]
fld dword [ecx]
add dword [esp + 0x3c], 4
fmul dword [esp + 0x60]
add dword [esp + 0x38], 4
add edx, 1
add ebp, 4
sub eax, 1
fadd dword [esp + 0x10]
fstp dword [esp + 0x10]
jne 0x40dd05
mov ebp, dword [esp + 0x48]
mov eax, dword [esp + 0x1c]
fld dword [esp + 0x10]
mov edx, dword [esp + 0x64]
fstp dword [edx + eax*4]
add eax, 1
cmp eax, dword [esp + 0x68]
mov dword [esp + 0x1c], eax
jl 0x40dae0
mov ecx, dword [esp + 0x14]
mov eax, ecx
cdq
sub eax, edx
sar eax, 1
sub ecx, eax
mov eax, dword [esp + 0x18]
add ecx, eax
mov eax, dword [esp + 0x70]
cmp eax, ecx
jge 0x40dd84
mov dword [esp + 0x68], eax
jmp 0x40dd8a
mov eax, ecx
mov dword [esp + 0x68], ecx
fild dword [esp + 0x68]
mov ecx, dword [esp + 0x74]
fild dword [esp + 0x1c]
mov dword [ecx], eax
mov eax, dword [esp + 0x78]
fmul dword [ebp + 0x7ca8]
fsubp st(1)
fadd dword [ebp + eax*4 + 0xdbf8]
fstp dword [ebp + eax*4 + 0xdbf8]
mov eax, dword [ecx]
cmp eax, edi
jl 0x40de30
xor eax, eax
cmp edi, 4
jl 0x40de02
lea edx, [esi + 8]
mov ebp, dword [ecx]
sub ebp, edi
add ebp, eax
fld dword [ebx + ebp*4]
add edx, 0x10
fstp dword [edx - 0x18]
mov ebp, dword [ecx]
sub ebp, edi
add ebp, eax
fld dword [ebx + ebp*4 + 4]
fstp dword [edx - 0x14]
mov ebp, dword [ecx]
sub ebp, edi
add ebp, eax
fld dword [ebx + ebp*4 + 8]
fstp dword [edx - 0x10]
mov ebp, dword [ecx]
sub ebp, edi
add ebp, eax
fld dword [ebx + ebp*4 + 0xc]
add eax, 4
fstp dword [edx - 0xc]
lea ebp, [edi - 3]
cmp eax, ebp
jl 0x40ddc2
cmp eax, edi
jge 0x40df10
lea ebx, [ebx]
mov edx, dword [ecx]
sub edx, edi
add edx, eax
fld dword [ebx + edx*4]
add eax, 1
cmp eax, edi
fstp dword [esi + eax*4 - 4]
jl 0x40de10
mov eax, dword [esp + 0x1c]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x4c
ret
mov edx, edi
sub edx, eax
xor eax, eax
cmp edx, 4
mov dword [esp + 0x78], edx
jl 0x40de82
lea edx, [esi + 8]
mov ebp, dword [ecx]
add ebp, eax
fld dword [esi + ebp*4]
add edx, 0x10
fstp dword [edx - 0x18]
mov ebp, dword [ecx]
add ebp, eax
fld dword [esi + ebp*4 + 4]
fstp dword [edx - 0x14]
mov ebp, dword [ecx]
add ebp, eax
fld dword [esi + ebp*4 + 8]
fstp dword [edx - 0x10]
mov ebp, dword [ecx]
add ebp, eax
fld dword [esi + ebp*4 + 0xc]
mov ebp, dword [esp + 0x78]
fstp dword [edx - 0xc]
add eax, 4
add ebp, 0xfffffffd
cmp eax, ebp
jl 0x40de42
mov edx, dword [esp + 0x78]
cmp eax, edx
jge 0x40de98
mov ebp, dword [ecx]
add ebp, eax
fld dword [esi + ebp*4]
add eax, 1
cmp eax, edx
fstp dword [esi + eax*4 - 4]
jl 0x40de86
mov edx, edi
sub edx, eax
xor ecx, ecx
cmp edx, 4
jl 0x40def7
lea ecx, [esi + eax*4 + 8]
mov dword [esp + 0x78], ecx
mov ecx, edi
sub ecx, eax
sub ecx, 4
shr ecx, 2
add ecx, 1
lea ebp, [ecx*4]
mov dword [esp + 0x18], ebp
add eax, ebp
mov ebp, dword [esp + 0x78]
lea edx, [ebx + 8]
lea esp, [esp]
fld dword [edx - 8]
add edx, 0x10
fstp dword [ebp - 8]
add ebp, 0x10
sub ecx, 1
fld dword [edx - 0x14]
fstp dword [ebp - 0x14]
fld dword [edx - 0x10]
fstp dword [ebp - 0x10]
fld dword [edx - 0xc]
fstp dword [ebp - 0xc]
jne 0x40ded0
mov ecx, dword [esp + 0x18]
cmp eax, edi
jge 0x40df10
lea ebx, [ebx + ecx*4]
mov edi, edi
fld dword [ebx]
add eax, 1
fstp dword [esi + eax*4 - 4]
add ebx, 4
cmp eax, edi
jl 0x40df00
mov eax, dword [esp + 0x1c]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x4c
ret