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

Disassembly:
sub esp, 0x44
push esi
mov esi, ecx
mov eax, dword [esi + 0x74]
test eax, eax
je 0x405245
mov eax, dword [esi + 0xd0]
test eax, eax
je 0x405245
push ebx
push ebp
push edi
lea ecx, [esi + 4]
call fcn.0040bc10
mov ebx, dword [esi + 0x78]
mov ecx, eax
mov eax, ebx
mov dword [esp + 0x1c], ebx
cdq
sub eax, edx
mov dword [esp + 0x14], ecx
mov edi, eax
mov eax, dword [esi + 0x7c]
cdq
sub eax, edx
mov ebp, eax
mov eax, dword [esi + 0xb0]
imul eax, ebx
cdq
sub eax, edx
mov edx, dword [esi + 0x7c]
mov ebx, eax
xor eax, eax
sar edi, 1
sar ebp, 1
sar ebx, 1
test edx, edx
mov dword [esp + 0x34], edi
mov dword [esp + 0x44], ebp
mov dword [esp + 0x4c], ebx
mov dword [esp + 0x18], eax
jle 0x404f04
lea edx, [ebp + ebp*2]
mov dword [esp + 0x28], eax
shl edx, 1
mov dword [esp + 0x50], edx
mov ebp, dword [esp + 0x1c]
mov dword [esp + 0x30], 0
imul ebp, eax
cmp dword [esp + 0x1c], 0
jle 0x404ee9
mov eax, dword [esp + 0x28]
mov dword [esp + 0x20], 0
sub eax, edx
mov dword [esp + 0x2c], eax
mov eax, 0x80808081
imul ebx
fild dword [esp + 0x2c]
add edx, ebx
sar edx, 7
mov eax, edx
shr eax, 0x1f
add edx, eax
lea eax, [edi + edi*2]
mov dword [esp + 0x3c], edx
lea edx, [ebp*4]
shl eax, 1
mov dword [esp + 0x38], eax
mov dword [esp + 0x24], edx
jmp 0x404d56
mov eax, dword [esp + 0x38]
mov edx, dword [esp + 0x20]
mov ebp, dword [esi + 0xe4]
sub edx, eax
mov eax, dword [esi + 0xdc]
mov dword [esp + 0x2c], edx
mov edx, dword [esp + 0x24]
fild dword [esp + 0x2c]
mov eax, dword [eax + edx]
xor edx, edx
mov edi, eax
mov dl, ah
shr edi, 0x10
and edx, 0xff
and edi, 0xff
add edx, edi
and eax, 0xff
add edx, eax
mov eax, 0x55555556
imul edx
mov eax, edx
mov edi, dword [esi + 0xe0]
shr eax, 0x1f
add edx, eax
mov eax, dword [esi + 0x9c]
mov dword [esp + 0x48], edx
add edx, 0xffffff80
imul edx, dword [esp + 0x3c]
mov dword [esp + 0x2c], edx
mov ebx, dword [esi + 0x94]
fild dword [esp + 0x2c]
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 + 0x2c]
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 + 0x40]
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 + 0x2c]
fmul qword [ebx + ebp]
fld dword [esp + 0x10]
fmul qword [ebx + edi]
faddp st(1)
fsub dword [0x4c4aec]
fcom qword [0x4c4a78]
fnstsw ax
test ah, 1
je 0x404fbf
fdivr dword [0x4c4ae8]
fld st(0)
fmul dword [esp + 0x40]
fiadd dword [esp + 0x34]
call fcn.004989f0
fld dword [esp + 0x2c]
fmul qword [ebx + edi]
fld dword [esp + 0x10]
fmul qword [ebx + ebp]
mov dword [esp + 0x40], eax
fsubp st(1)
fmul st(1)
fiadd dword [esp + 0x44]
call fcn.004989f0
mov edx, dword [esp + 0x40]
test edx, edx
fstp st(0)
jl 0x404ea5
mov ecx, dword [esp + 0x1c]
cmp edx, ecx
jge 0x404ea5
test eax, eax
jl 0x404ea5
cmp eax, dword [esi + 0x7c]
jge 0x404ea5
mov ebx, dword [esp + 0x48]
cmp ebx, 3
jle 0x404ea5
imul ecx, eax
add ecx, dword [esi + 0xc8]
mov byte [ecx + edx], bl
mov ecx, dword [esp + 0x14]
mov eax, dword [esp + 0x30]
mov ebp, dword [esp + 0x20]
mov ebx, dword [esp + 0x24]
mov edx, dword [esi + 0x78]
inc eax
add ebp, 6
add ebx, 4
cmp eax, edx
mov dword [esp + 0x30], eax
mov dword [esp + 0x20], ebp
mov dword [esp + 0x24], ebx
mov dword [esp + 0x1c], edx
jl 0x404d52
mov edi, dword [esp + 0x34]
mov ebx, dword [esp + 0x4c]
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0x50]
fstp st(0)
mov ebp, dword [esp + 0x28]
inc eax
add ebp, 6
mov dword [esp + 0x18], eax
mov dword [esp + 0x28], ebp
mov ebp, dword [esi + 0x7c]
cmp eax, ebp
jl 0x404cf5
mov ebp, dword [esi + 0x78]
mov edx, dword [esi + 0x7c]
shl ebp, 2
mov eax, 1
dec edx
cmp edx, eax
mov dword [esp + 0x10], ebp
mov dword [esp + 0x18], eax
jle 0x40516f
mov edi, dword [esi + 0x78]
mov ebx, 1
mov edx, edi
imul edx, eax
cmp edi, ebx
mov dword [esp + 0x30], edx
jle 0x4050e4
lea ebp, [ecx + 6]
mov dword [esp + 0x28], ebp
mov ebp, dword [esp + 0x10]
imul ebp, eax
lea ecx, [ecx + ebp + 6]
mov dword [esp + 0x34], ecx
mov ebp, dword [esi + 0xc8]
lea ecx, [ebx + ebp]
add ecx, edx
xor edx, edx
mov dword [esp + 0x50], ecx
lea ecx, [eax - 1]
imul ecx, edi
add ecx, ebp
inc eax
imul eax, edi
mov dl, byte [ecx + ebx]
add eax, ebp
xor ecx, ecx
mov cl, byte [eax + ebx]
mov eax, dword [esp + 0x50]
add edx, ecx
xor ecx, ecx
mov cl, byte [eax - 1]
add edx, ecx
xor ecx, ecx
mov cl, byte [eax + 1]
add edx, ecx
xor ecx, ecx
mov cl, byte [eax]
mov eax, 0x66666667
add edx, ecx
imul edx
sar edx, 1
mov eax, edx
shr eax, 0x1f
add edx, eax
mov eax, dword [esi + 0xb4]
mov byte [esp + 0x1c], dl
mov ecx, dword [esp + 0x1c]
and ecx, 0xff
cmp ecx, eax
jl 0x404fc6
sub dl, al
jmp 0x404fc8
fstp st(0)
jmp 0x404ea9
xor dl, dl
mov eax, dword [esp + 0x18]
mov byte [esp + 0x1c], dl
imul edi, eax
add edi, ebp
mov ebp, dword [esp + 0x34]
mov byte [edi + ebx], dl
mov edi, dword [esp + 0x1c]
mov edx, dword [esi + 0xd8]
and edi, 0xff
cmp eax, 1
mov cl, byte [edi + edx]
mov byte [ebp - 2], cl
mov edx, dword [esi + 0xd4]
mov cl, byte [edi + edx]
mov byte [ebp - 1], cl
mov edx, dword [esi + 0xd0]
mov cl, byte [edi + edx]
mov byte [ebp], cl
jne 0x4050ba
mov edi, dword [esi + 0x7c]
mov edx, dword [esi + 0xd8]
dec edi
lea ecx, [ebx*4]
imul edi, dword [esp + 0x10]
add edi, ecx
mov cl, byte [edx]
mov edx, dword [esp + 0x14]
mov byte [edi + edx], cl
mov edi, dword [esi + 0x7c]
dec edi
mov edx, dword [esi + 0xd4]
imul edi, dword [esp + 0x10]
lea ecx, [ebx*4]
add edi, ecx
mov cl, byte [edx]
mov edx, dword [esp + 0x14]
mov byte [edi + edx + 1], cl
mov edi, dword [esi + 0x7c]
dec edi
mov edx, dword [esi + 0xd0]
imul edi, dword [esp + 0x10]
mov dl, byte [edx]
lea ecx, [ebx*4]
add edi, ecx
mov ecx, dword [esp + 0x14]
mov byte [edi + ecx + 2], dl
mov edx, dword [esi + 0xd8]
mov edi, dword [esp + 0x28]
mov dl, byte [edx]
mov byte [edi - 2], dl
mov edx, dword [esi + 0xd4]
mov dl, byte [edx]
mov byte [edi - 1], dl
mov edx, dword [esi + 0xd0]
mov dl, byte [edx]
mov byte [edi], dl
mov edx, dword [esi + 0xc8]
mov byte [edx + ebx], 0
mov edx, dword [esi + 0x7c]
dec edx
imul edx, dword [esi + 0x78]
add edx, dword [esi + 0xc8]
mov byte [edx + ebx], 0
jmp 0x4050c2
mov edi, dword [esp + 0x28]
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x30]
add edi, 4
mov dword [esp + 0x28], edi
mov edi, dword [esi + 0x78]
inc ebx
add ebp, 4
cmp ebx, edi
mov dword [esp + 0x34], ebp
jl 0x404f52
mov ebp, dword [esp + 0x10]
mov edi, dword [esi + 0xc8]
mov byte [edi + edx], 0
mov edi, dword [esi + 0xc8]
add edi, dword [esi + 0x7c]
mov byte [edi + edx - 1], 0
mov edx, ebp
mov edi, dword [esi + 0xd8]
imul edx, eax
mov bl, byte [edi]
inc eax
mov byte [edx + ecx], bl
mov edi, dword [esi + 0xd4]
mov dword [esp + 0x18], eax
mov bl, byte [edi]
mov byte [edx + ecx + 1], bl
mov edi, dword [esi + 0xd0]
mov bl, byte [edi]
mov byte [edx + ecx + 2], bl
mov ebx, dword [esi + 0x78]
mov edi, dword [esi + 0xd8]
lea ebp, [edx + ebx*4]
mov bl, byte [edi]
mov byte [ecx + ebp - 4], bl
mov ebx, dword [esi + 0x78]
mov edi, dword [esi + 0xd4]
lea ebp, [edx + ebx*4]
mov bl, byte [edi]
mov byte [ecx + ebp - 3], bl
mov ebx, dword [esi + 0x78]
mov edi, dword [esi + 0xd0]
mov ebp, dword [esp + 0x10]
lea edx, [edx + ebx*4]
mov bl, byte [edi]
mov byte [edx + ecx - 2], bl
mov edx, dword [esi + 0x7c]
dec edx
cmp eax, edx
jl 0x404f23
mov eax, dword [esi + 0xd8]
mov ebx, ecx
mov dl, byte [eax]
mov byte [ecx], dl
mov eax, dword [esi + 0xd4]
mov dl, byte [eax]
mov byte [ecx + 1], dl
mov eax, dword [esi + 0xd0]
mov dl, byte [eax]
mov byte [ecx + 2], dl
mov eax, dword [esi + 0xd8]
mov edx, dword [esi + 0x78]
mov al, byte [eax]
mov byte [ecx + edx*4 - 4], al
mov edx, dword [esi + 0xd4]
mov eax, dword [esi + 0x78]
mov dl, byte [edx]
mov byte [ecx + eax*4 - 3], dl
mov eax, dword [esi + 0xd0]
mov edx, dword [esi + 0x78]
mov al, byte [eax]
mov byte [ecx + edx*4 - 2], al
mov eax, dword [esi + 0x7c]
dec eax
mov edx, dword [esi + 0xd8]
imul eax, ebp
mov edi, dword [esi + 0x78]
mov dl, byte [edx]
add ebx, eax
mov byte [ebx + edi*4 - 4], dl
mov edx, dword [esi + 0x7c]
dec edx
mov eax, dword [esi + 0xd4]
imul edx, ebp
mov edi, dword [esi + 0x78]
mov al, byte [eax]
mov ebx, ecx
add ebx, edx
mov byte [ebx + edi*4 - 3], al
mov eax, dword [esi + 0x7c]
dec eax
mov edx, dword [esi + 0xd0]
imul eax, ebp
mov edi, dword [esi + 0x78]
mov dl, byte [edx]
mov ebx, ecx
add ebx, eax
mov byte [ebx + edi*4 - 2], dl
mov edx, dword [esi + 0x7c]
dec edx
mov eax, dword [esi + 0xd8]
imul edx, ebp
mov al, byte [eax]
pop edi
mov byte [edx + ecx], al
mov eax, dword [esi + 0x7c]
dec eax
mov edx, dword [esi + 0xd4]
imul eax, ebp
mov dl, byte [edx]
mov byte [eax + ecx + 1], dl
mov edx, dword [esi + 0x7c]
dec edx
mov eax, dword [esi + 0xd0]
imul edx, ebp
mov al, byte [eax]
pop ebp
mov byte [edx + ecx + 2], al
pop ebx
pop esi
add esp, 0x44
ret