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

Disassembly:
sub esp, 0x30
mov eax, dword [esp + 0x3c]
mov ecx, dword [esp + 0x60]
mov dword [esp + 4], eax
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0x48]
push ebx
mov ebx, dword [esp + 0x50]
push ebp
cdq
sub eax, edx
push esi
sar eax, 1
mov esi, ecx
push edi
sub esi, eax
mov eax, ebx
cdq
sub eax, edx
mov ebp, dword [esp + 0x6c]
mov edi, eax
mov eax, dword [esp + 0x74]
sar edi, 1
imul ebp, dword [esp + 0x64]
mov edx, eax
sub ecx, esi
sub edx, edi
mov edi, dword [esp + 0x68]
sub eax, edx
add ebp, edi
mov dword [esp + 0x6c], eax
mov edi, dword [esp + 0x60]
fild dword [esp + 0x6c]
mov dword [esp + 0x6c], ecx
add ebp, edi
fild dword [esp + 0x6c]
mov dword [esp + 0x10], 0
mov dword [esp + 0x18], esi
mov dword [esp + 0x20], edx
mov dword [esp + 0x5c], ebp
fpatan
fmul qword [0x4a43a8]
call fcn.00492860
mov esi, dword [esp + 0x78]
mov ecx, esi
sub ecx, eax
mov dword [esp + 0x6c], ecx
fild dword [esp + 0x6c]
fild dword [esp + 0x70]
fstp qword [esp + 0x28]
fild dword [esp + 0x18]
fsub qword [esp + 0x28]
fabs
fild dword [esp + 0x74]
fstp qword [esp + 0x18]
fild dword [esp + 0x20]
fsub qword [esp + 0x18]
fabs
fld st(1)
fmul st(2)
fld st(1)
fmul st(2)
faddp st(1)
fsqrt
fstp qword [esp + 0x20]
fstp st(0)
fstp st(0)
call fcn.00492860
mov edi, eax
push edi
call fcn.00433b60
fmul qword [esp + 0x24]
add esp, 4
fsubr qword [esp + 0x28]
push edi
fstp qword [esp + 0x2c]
call fcn.00433b20
fmul qword [esp + 0x24]
add esp, 4
fadd qword [esp + 0x18]
push esi
fstp qword [esp + 0x1c]
call fcn.00433b60
fstp qword [esp + 0x24]
add esp, 4
push esi
call fcn.00433b20
add esp, 4
add esi, 0x10e
fchs
fstp qword [esp + 0x30]
push esi
call fcn.00433b60
fstp qword [esp + 0x3c]
add esp, 4
push esi
call fcn.00433b20
add esp, 4
test ebx, ebx
fchs
jle 0x4105c9
fld qword [esp + 0x28]
fld qword [esp + 0x20]
fld qword [esp + 0x18]
mov dword [esp + 0x74], ebx
mov ebx, dword [esp + 0x7c]
mov eax, dword [esp + 0x58]
fld st(2)
test eax, eax
fld st(1)
jle 0x4105a4
mov dword [esp + 0x70], eax
mov al, byte [ebp]
fxch st(1)
fadd st(3)
fxch st(1)
fadd qword [esp + 0x30]
test al, al
je 0x410550
fld st(1)
fsub qword [0x4a43b0]
call fcn.00492860
fld st(0)
fsub qword [0x4a43b0]
mov esi, eax
call fcn.00492860
fld st(0)
mov edi, eax
call fcn.00492860
cmp esi, dword [ebx]
jl 0x410550
cmp esi, dword [ebx + 8]
jg 0x410550
cmp edi, dword [ebx + 4]
jl 0x410550
cmp edi, dword [ebx + 0xc]
jg 0x410550
mov edx, edi
lea ecx, [esi + esi*2]
imul edx, dword [esp + 0x48]
mov esi, dword [esp + 0x44]
add esi, edx
xor edx, edx
add ecx, esi
mov esi, dword [esp + 0x4c]
cmp edi, eax
mov dl, byte [esi]
mov esi, dword [esp + 0x54]
mov bl, byte [esi + edx*4 + 0x400]
lea edx, [esi + edx*4 + 0x400]
mov byte [ecx], bl
mov bl, byte [edx + 1]
mov byte [ecx + 1], bl
mov bl, byte [edx + 2]
mov byte [ecx + 2], bl
mov ebx, dword [esp + 0x7c]
je 0x410550
cmp eax, dword [ebx + 4]
jl 0x410550
mov eax, dword [esp + 0x48]
sub ecx, eax
mov al, byte [edx]
mov byte [ecx], al
mov al, byte [edx + 1]
mov byte [ecx + 1], al
mov dl, byte [edx + 2]
mov byte [ecx + 2], dl
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x58]
inc eax
cmp eax, ecx
mov dword [esp + 0x10], eax
jl 0x41058b
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x50]
mov ebp, dword [esp + 0x5c]
add eax, ecx
mov dword [esp + 0x14], eax
mov dword [esp + 0x4c], eax
mov eax, dword [esp + 0x64]
mov dword [esp + 0x10], 0
add ebp, eax
mov dword [esp + 0x5c], ebp
jmp 0x410595
mov ecx, dword [esp + 0x4c]
inc ecx
inc ebp
mov dword [esp + 0x4c], ecx
mov eax, dword [esp + 0x70]
dec eax
mov dword [esp + 0x70], eax
jne 0x4104a6
fstp st(0)
mov eax, dword [esp + 0x74]
fstp st(0)
fld qword [esp + 0x38]
fld st(4)
fxch st(1)
faddp st(4)
dec eax
mov dword [esp + 0x74], eax
faddp st(1)
jne 0x410492
fstp st(0)
fstp st(0)
fstp st(0)
pop edi
pop esi
pop ebp
pop ebx
fstp st(0)
add esp, 0x30
ret