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

Disassembly:
sub esp, 0x5c
push esi
mov esi, ecx
mov eax, dword [esi + 0x74]
test eax, eax
je 0x404fae
mov eax, dword [esp + 0x6c]
mov ecx, dword [esp + 0x68]
mov edx, dword [esp + 0x64]
push ebx
push ebp
mov ebp, dword [esp + 0x78]
push edi
mov edi, dword [esp + 0x80]
push edi
push ebp
lea ebx, [esi + 0x3c]
push eax
push ecx
push edx
mov ecx, ebx
mov dword [esp + 0x7c], ebx
call fcn.0040a700
mov ecx, ebx
call fcn.0040a8a0
mov dword [esp + 0x24], eax
mov eax, ebp
shl eax, 8
mov ebx, dword [esi + 0x78]
sub eax, ebp
mov dword [esp + 0x30], ebx
lea eax, [eax + eax*4]
mov dword [esp + 0x34], eax
fild dword [esp + 0x34]
fidiv dword [esp + 0x30]
call fcn.004bfae0
mov dword [esp + 0x2c], eax
mov eax, edi
shl eax, 8
mov ecx, dword [esi + 0x7c]
sub eax, edi
mov dword [esp + 0x1c], ecx
lea edx, [eax + eax*4]
mov dword [esp + 0x34], edx
fild dword [esp + 0x34]
fidiv dword [esp + 0x1c]
call fcn.004bfae0
mov dword [esp + 0x34], eax
mov eax, ebp
cdq
sub eax, edx
mov ecx, dword [esp + 0x1c]
sar eax, 1
mov dword [esp + 0x48], eax
mov eax, edi
cdq
sub eax, edx
sar eax, 1
mov dword [esp + 0x4c], eax
mov eax, dword [esi + 0xb0]
lea eax, [eax + eax*2]
lea eax, [eax + eax*4]
lea eax, [eax + eax*4]
shl eax, 1
cdq
sub eax, edx
mov edi, eax
mov eax, ebx
cdq
sub eax, edx
mov ebp, eax
mov eax, ecx
cdq
sub eax, edx
xor edx, edx
sar edi, 1
sar ebp, 1
sar eax, 1
test ecx, ecx
mov dword [esp + 0x64], edi
mov dword [esp + 0x60], ebp
mov dword [esp + 0x30], edx
jle 0x404f8e
imul eax, dword [esp + 0x34]
mov dword [esp + 0x1c], edx
mov dword [esp + 0x38], eax
mov eax, ebx
mov dword [esp + 0x28], 0
imul eax, edx
test ebx, ebx
mov dword [esp + 0x18], eax
jle 0x404f70
mov ecx, dword [esp + 0x1c]
mov eax, dword [esp + 0x38]
sub ecx, eax
mov eax, 0x80808081
imul ecx
add edx, ecx
mov dword [esp + 0x14], 0
sar edx, 7
mov eax, edx
shr eax, 0x1f
add edx, eax
mov eax, 0x80808081
mov dword [esp + 0x20], edx
imul edi
fild dword [esp + 0x20]
add edx, edi
mov eax, ebp
sar edx, 7
mov ecx, edx
shr ecx, 0x1f
add edx, ecx
imul eax, dword [esp + 0x2c]
mov dword [esp + 0x40], edx
mov edx, dword [esp + 0x18]
mov dword [esp + 0x3c], eax
lea ecx, [edx*4]
mov dword [esp + 0x18], ecx
jmp 0x404d37
mov eax, dword [esp + 0x3c]
mov ecx, dword [esp + 0x14]
mov edi, dword [esi + 0xe0]
sub ecx, eax
mov eax, 0x80808081
imul ecx
add edx, ecx
mov ecx, dword [esi + 0xdc]
sar edx, 7
mov eax, edx
mov ebp, dword [esi + 0xe4]
shr eax, 0x1f
add edx, eax
mov ebx, dword [esi + 0x94]
mov dword [esp + 0x20], edx
mov edx, dword [esp + 0x18]
fild dword [esp + 0x20]
mov eax, dword [edx + ecx]
mov cx, ax
mov edx, eax
shr cx, 8
shr edx, 0x10
mov word [esp + 0x58], cx
mov dword [esp + 0x5c], edx
and ecx, 0xff
and edx, 0xff
mov dword [esp + 0x54], eax
add ecx, edx
and eax, 0xff
add ecx, eax
mov eax, 0x55555556
imul ecx
mov eax, edx
shr eax, 0x1f
add edx, eax
mov eax, dword [esi + 0x9c]
mov dword [esp + 0x50], edx
add edx, 0xffffff80
imul edx, dword [esp + 0x40]
mov dword [esp + 0x20], edx
fild dword [esp + 0x20]
shl eax, 3
shl ebx, 3
fstp dword [esp + 0x10]
fld st(1)
fmul qword [edi + eax]
fld st(1)
fmul qword [eax + ebp]
faddp st(1)
fstp dword [esp + 0x20]
fmul qword [edi + eax]
fld st(1)
fmul qword [eax + ebp]
mov eax, dword [esi + 0x98]
shl eax, 3
fsubp st(1)
fld st(0)
fmul qword [eax + edi]
fld dword [esp + 0x10]
fmul qword [eax + ebp]
fsubp st(1)
fstp dword [esp + 0x44]
fld dword [esp + 0x10]
fmul qword [eax + edi]
fxch st(1)
fmul qword [eax + ebp]
faddp st(1)
fstp dword [esp + 0x10]
fld dword [esp + 0x20]
fmul qword [ebx + ebp]
fld dword [esp + 0x10]
fmul qword [ebx + edi]
faddp st(1)
fsub dword [0x4eab3c]
fcom qword [0x4eaac8]
fnstsw ax
test ah, 1
je 0x404f33
fdivr dword [0x4eab38]
fld st(0)
fmul dword [esp + 0x44]
fiadd dword [esp + 0x48]
call fcn.004bfae0
fld dword [esp + 0x20]
fmul qword [ebx + edi]
fld dword [esp + 0x10]
fmul qword [ebx + ebp]
mov dword [esp + 0x44], eax
fsubp st(1)
fmul st(1)
fiadd dword [esp + 0x4c]
call fcn.004bfae0
mov edi, dword [esp + 0x44]
test edi, edi
fstp st(0)
jl 0x404f35
mov ebx, dword [esp + 0x7c]
cmp edi, ebx
jge 0x404f35
test eax, eax
jl 0x404f35
cmp eax, dword [esp + 0x80]
jge 0x404f35
mov ecx, dword [esp + 0x50]
mov ebp, dword [esi + 0x88]
xor edx, edx
cmp ecx, 3
setg dl
cmp ebp, 2
jne 0x404eca
xor edx, edx
cmp ecx, 0xfe
setl dl
test edx, edx
je 0x404f35
test ebp, ebp
jne 0x404f0a
lea edx, [ebx*4]
imul eax, edx
mov edx, dword [esp + 0x24]
add edx, eax
lea eax, [edx + edi*4]
mov edx, dword [esi + 0xd8]
mov dl, byte [edx + ecx]
mov byte [eax], dl
mov edx, dword [esi + 0xd4]
mov dl, byte [edx + ecx]
mov byte [eax + 1], dl
mov edx, dword [esi + 0xd0]
mov cl, byte [edx + ecx]
mov byte [eax + 2], cl
jmp 0x404f35
lea ecx, [ebx*4]
mov edx, dword [esp + 0x24]
imul eax, ecx
mov cl, byte [esp + 0x54]
add edx, eax
lea eax, [edx + edi*4]
mov dl, byte [esp + 0x58]
mov byte [eax], cl
mov cl, byte [esp + 0x5c]
mov byte [eax + 1], dl
mov byte [eax + 2], cl
jmp 0x404f35
fstp st(0)
mov edx, dword [esp + 0x2c]
mov edi, dword [esp + 0x14]
mov eax, dword [esp + 0x28]
mov ebx, dword [esi + 0x78]
add edi, edx
mov edx, dword [esp + 0x18]
inc eax
add edx, 4
cmp eax, ebx
mov dword [esp + 0x28], eax
mov dword [esp + 0x14], edi
mov dword [esp + 0x18], edx
jl 0x404d33
mov edx, dword [esp + 0x30]
mov ebp, dword [esp + 0x60]
mov edi, dword [esp + 0x64]
fstp st(0)
mov eax, dword [esp + 0x34]
mov ecx, dword [esp + 0x1c]
add ecx, eax
mov eax, dword [esi + 0x7c]
inc edx
mov dword [esp + 0x1c], ecx
cmp edx, eax
mov dword [esp + 0x30], edx
jl 0x404cba
mov ecx, dword [esp + 0x78]
mov edx, dword [esp + 0x74]
mov eax, dword [esp + 0x70]
push 0xcc0020
push ecx
mov ecx, dword [esp + 0x70]
push edx
push eax
call fcn.0040a360
pop edi
pop ebp
pop ebx
pop esi
add esp, 0x5c
ret 0x14