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

Disassembly:
push edi
push esi
push ebp
push ebx
sub esp, 0x84
mov esi, ecx
mov ebp, edx
mov edi, dword [esp + 0xa4]
mov eax, dword [esp + 0xbc]
mov edx, dword [eax + 0x34]
mov byte [edx + 0x76], 1
mov ebx, dword [edi*4 + 0x77eea0]
mov eax, dword [edx + 0x80]
mov dword [esp + 0x18], eax
mov ecx, dword [edx + 0x68]
mov eax, dword [edx + 0x6c]
mov dword [esp + 0x48], eax
mov eax, ebx
sar eax, 2
shr eax, 0x1d
add eax, ebx
sar eax, 3
mov dword [esp + 0x64], eax
mov eax, dword [esp + 0xa8]
lea edx, [eax + eax]
add edx, edx
sub edx, eax
lea eax, [eax + edx*8]
add eax, eax
add eax, eax
cdq
idiv edi
mov dword [esp + 0x4c], eax
mov eax, dword [esp + 0xb4]
test eax, eax
mov eax, dword [esp + 0x48]
jl 0x4061ec
mov edx, dword [esp + 0xb4]
mov edi, dword [esp + 0xa8]
lea edi, [edi + edx - 1]
cmp eax, edi
jle 0x4061ec
mov eax, dword [esp + 0xb0]
test eax, eax
jl 0x4061ec
mov edi, dword [esp + 0xb0]
mov eax, dword [esp + 0xa4]
lea eax, [eax + edi - 1]
cmp ecx, eax
jle 0x4061ec
cmp esi, 0xffffffff
jne 0x405be4
mov esi, ebp
mov eax, ebp
sar eax, 0x10
movzx eax, al
mov dword [esp + 0x3c], eax
mov edi, ebp
sar edi, 8
and edi, 0xff
mov dword [esp + 0x40], edi
and ebp, 0xff
mov dword [esp + 0x44], ebp
mov edx, esi
sar edx, 0x10
movzx edx, dl
mov eax, esi
sar eax, 8
movzx eax, al
mov dword [esp + 0x48], eax
and esi, 0xff
cmp dword [esp + 0xb8], 0
je 0x405f3c
fld qword [0x562270]
mov ebp, dword [esp + 0xa8]
mov dword [esp + 0x78], ebp
fild dword [esp + 0x78]
fcom st(1)
fnstsw ax
sahf
jbe 0x4061f9
xor eax, eax
mov dword [esp + 0x2c], eax
sub edx, dword [esp + 0x3c]
mov ebp, dword [esp + 0xa8]
lea edi, [ebp - 1]
mov dword [esp + 0x30], edi
mov eax, dword [esp + 0x48]
sub eax, dword [esp + 0x40]
mov dword [esp + 0x48], eax
sub esi, dword [esp + 0x44]
mov eax, dword [esp + 0xb4]
imul eax, ecx
add eax, dword [esp + 0xb0]
mov dword [esp + 0x10], eax
fld qword [0x562278]
mov eax, dword [esp + 0xa4]
mov dword [esp + 0x78], eax
fild dword [esp + 0x78]
fld qword [0x562280]
fld qword [0x562288]
mov ebp, dword [esp + 0x64]
lea eax, [ebp + ebp]
add eax, ebp
xor ebp, ebp
mov dword [esp + 0x14], ebp
xor ebp, ebp
mov dword [esp + 0x38], ebp
xor ebp, ebp
mov dword [esp + 0x34], ebp
xor edi, edi
mov dword [esp + 0x28], esi
mov dword [esp + 0x24], edx
mov dword [esp + 0x50], eax
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x80], ebx
mov ecx, dword [esp + 0x14]
mov ebx, dword [esp + 0x10]
mov eax, ecx
cdq
mov esi, dword [esp + 0x30]
idiv esi
add eax, dword [esp + 0x3c]
movzx eax, al
mov dword [esp + 0x54], eax
mov eax, dword [esp + 0x38]
cdq
idiv esi
add eax, dword [esp + 0x40]
movzx eax, al
mov dword [esp + 0x58], eax
mov eax, dword [esp + 0x34]
cdq
idiv esi
add eax, dword [esp + 0x44]
movzx eax, al
mov dword [esp + 0x5c], eax
lea esi, [ebx + ebx]
add esi, esi
mov eax, edi
cdq
mov ebp, dword [esp + 0x4c]
idiv ebp
mov dword [esp + 0x78], eax
fild dword [esp + 0x78]
fmul st(4)
fadd st(6)
fnstcw word [esp + 4]
movzx eax, word [esp + 4]
or eax, 0xc00
mov dword [esp + 0xc], eax
fldcw word [esp + 0xc]
fistp dword [esp + 0x70]
fldcw word [esp + 4]
mov eax, dword [esp + 0x70]
imul eax, dword [esp + 0x64]
mov dword [esp + 0x60], eax
mov edx, dword [0x5a34fc]
cmp eax, dword [edx*4 + 0x7d4410]
jge 0x405ee9
add esi, dword [esp + 0x18]
fxch st(5)
fcom st(2)
fnstsw ax
sahf
fxch st(5)
jae 0x405ee9
xor ebp, ebp
fld qword [0x562270]
mov dword [esp + 0x20], edi
mov dword [esp + 0x14], ecx
mov dword [esp + 0x10], ebx
fmul st(4)
fadd st(6)
fmul st(2)
fmul st(1)
fnstcw word [esp + 4]
movzx eax, word [esp + 4]
or eax, 0xc00
mov dword [esp + 0xc], eax
fldcw word [esp + 0xc]
fistp dword [esp + 0x70]
fldcw word [esp + 4]
mov edx, dword [esp + 0x70]
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
sar ecx, 1
mov eax, dword [esp + 0x80]
cmp eax, ecx
jg 0x405de9
add esi, 4
jmp 0x405ec7
mov eax, dword [0x5a34fc]
mov ebx, dword [eax*4 + 0x7d43f0]
add ebx, dword [esp + 0x60]
lea eax, [ecx + ebx]
movzx ecx, byte [ecx + ebx]
mov edi, dword [esp + 0x64]
movzx ebx, byte [eax + edi]
mov ecx, dword [ecx*4 + 0x77eaa0]
add ecx, dword [ebx*4 + 0x77eaa0]
movzx ebx, byte [eax + edi*2]
mov edi, dword [esp + 0x50]
movzx eax, byte [edi + eax]
mov ebx, dword [ebx*4 + 0x77eaa0]
add ebx, dword [eax*4 + 0x77eaa0]
add ecx, ebx
and edx, 1
test edx, edx
jne 0x405e49
sar ecx, 8
movzx ecx, cl
movzx edi, byte [ecx + 0x7d44d4]
inc edi
jmp 0x405e54
movzx ecx, cl
movzx edi, byte [ecx + 0x7d44d4]
inc edi
movzx eax, byte [esi + 3]
lea edx, [eax + edi]
imul eax, edi
sar eax, 8
sub edx, eax
dec edx
movzx edx, dl
mov byte [esi + 3], dl
inc edx
mov dword [esp + 0x68], edx
movzx eax, byte [esi]
mov dword [esp + 0x6c], eax
mov eax, dword [esp + 0x5c]
sub eax, dword [esp + 0x6c]
imul eax, edi
cdq
mov ecx, dword [esp + 0x68]
idiv ecx
mov edx, dword [esp + 0x6c]
add edx, eax
mov byte [esi], dl
movzx eax, byte [esi + 1]
mov dword [esp + 0x6c], eax
mov eax, dword [esp + 0x58]
sub eax, dword [esp + 0x6c]
imul eax, edi
cdq
mov ebx, ecx
idiv ebx
add eax, dword [esp + 0x6c]
mov byte [esi + 1], al
movzx ebx, byte [esi + 2]
mov eax, dword [esp + 0x54]
sub eax, ebx
imul eax, edi
cdq
idiv ecx
add eax, ebx
mov byte [esi + 2], al
add esi, 4
inc ebp
mov dword [esp + 0x78], ebp
fild dword [esp + 0x78]
fcom st(3)
fnstsw ax
sahf
jb 0x405da3
fstp st(0)
mov edi, dword [esp + 0x20]
mov ecx, dword [esp + 0x14]
mov ebx, dword [esp + 0x10]
add ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x38]
add edx, dword [esp + 0x48]
mov dword [esp + 0x38], edx
mov ebp, dword [esp + 0x34]
add ebp, dword [esp + 0x28]
mov dword [esp + 0x34], ebp
add ebx, dword [esp + 0x1c]
add edi, 0x190
mov esi, dword [esp + 0x2c]
inc esi
mov dword [esp + 0x2c], esi
mov dword [esp + 0x78], esi
fild dword [esp + 0x78]
fcomp st(5)
fnstsw ax
sahf
jb 0x405cec
fstp st(0)
fstp st(0)
fstp st(0)
fstp st(0)
fstp st(0)
fstp st(0)
jmp 0x4061e0
fld qword [0x562270]
mov ebp, dword [esp + 0xa8]
mov dword [esp + 0x78], ebp
fild dword [esp + 0x78]
fcom st(1)
fnstsw ax
sahf
jbe 0x4061ff
xor eax, eax
mov dword [esp + 0x20], eax
sub edx, dword [esp + 0x3c]
mov ebp, dword [esp + 0xa8]
lea edi, [ebp - 1]
mov dword [esp + 0x30], edi
mov eax, dword [esp + 0x48]
sub eax, dword [esp + 0x40]
mov dword [esp + 0x48], eax
sub esi, dword [esp + 0x44]
mov eax, dword [esp + 0xb4]
imul eax, ecx
add eax, dword [esp + 0xb0]
mov dword [esp + 0x60], eax
fld qword [0x562278]
mov eax, dword [esp + 0xa4]
mov dword [esp + 0x78], eax
fild dword [esp + 0x78]
fld qword [0x562280]
fld qword [0x562288]
mov ebp, dword [esp + 0x64]
lea eax, [ebp + ebp]
add eax, ebp
xor ebp, ebp
mov dword [esp + 0x5c], ebp
xor ebp, ebp
mov dword [esp + 0x2c], ebp
xor ebp, ebp
mov dword [esp + 0x34], ebp
xor ebp, ebp
mov dword [esp + 0x38], ebp
mov dword [esp + 0x54], eax
mov dword [esp + 0x28], esi
mov dword [esp + 0x24], edx
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x80], ebx
mov ebp, dword [esp + 0x5c]
mov esi, dword [esp + 0x60]
mov eax, ebp
cdq
mov edi, dword [esp + 0x30]
idiv edi
add eax, dword [esp + 0x3c]
movzx ebx, al
mov eax, dword [esp + 0x2c]
cdq
idiv edi
add eax, dword [esp + 0x40]
movzx ecx, al
mov eax, dword [esp + 0x34]
cdq
idiv edi
add eax, dword [esp + 0x44]
movzx eax, al
shl ebx, 0x10
shl ecx, 8
add ebx, ecx
add ebx, eax
lea ecx, [esi + esi]
add ecx, ecx
mov eax, dword [esp + 0x38]
cdq
mov edi, dword [esp + 0x4c]
idiv edi
mov dword [esp + 0x78], eax
fild dword [esp + 0x78]
fmul st(4)
fadd st(6)
fnstcw word [esp + 4]
movzx eax, word [esp + 4]
or eax, 0xc00
mov dword [esp + 0xc], eax
fldcw word [esp + 0xc]
fistp dword [esp + 0x70]
fldcw word [esp + 4]
mov edx, dword [esp + 0x70]
imul edx, dword [esp + 0x64]
mov dword [esp + 0x50], edx
mov edi, dword [0x5a34fc]
cmp edx, dword [edi*4 + 0x7d4410]
jge 0x406190
add ecx, dword [esp + 0x18]
fxch st(5)
fcom st(2)
fnstsw ax
sahf
fxch st(5)
jae 0x406190
xor edx, edx
fld qword [0x562270]
mov dword [esp + 0x58], ebx
mov dword [esp + 0x5c], ebp
mov dword [esp + 0x60], esi
fmul st(4)
fadd st(6)
fmul st(2)
fmul st(1)
fnstcw word [esp + 4]
movzx eax, word [esp + 4]
or eax, 0xc00
mov dword [esp + 0xc], eax
fldcw word [esp + 0xc]
fistp dword [esp + 0x70]
fldcw word [esp + 4]
mov ebx, dword [esp + 0x70]
mov ebp, ebx
shr ebp, 0x1f
add ebp, ebx
sar ebp, 1
mov eax, dword [esp + 0x80]
cmp eax, ebp
jg 0x4060f5
add ecx, 4
jmp 0x406172
mov eax, dword [0x5a34fc]
mov esi, dword [eax*4 + 0x7d43f0]
add esi, dword [esp + 0x50]
lea eax, [ebp + esi]
movzx ebp, byte [ebp + esi]
mov edi, dword [esp + 0x64]
movzx esi, byte [eax + edi]
mov ebp, dword [ebp*4 + 0x77eaa0]
add ebp, dword [esi*4 + 0x77eaa0]
movzx esi, byte [eax + edi*2]
mov edi, dword [esp + 0x54]
movzx eax, byte [edi + eax]
mov esi, dword [esi*4 + 0x77eaa0]
add esi, dword [eax*4 + 0x77eaa0]
add ebp, esi
and ebx, 1
test ebx, ebx
jne 0x406159
sar ebp, 8
and ebp, 0xff
movzx eax, byte [ebp + 0x7d44d4]
jmp 0x406166
and ebp, 0xff
movzx eax, byte [ebp + 0x7d44d4]
shl eax, 0x18
add eax, dword [esp + 0x58]
mov dword [ecx], eax
add ecx, 4
inc edx
mov dword [esp + 0x78], edx
fild dword [esp + 0x78]
fcom st(3)
fnstsw ax
sahf
jb 0x4060b2
fstp st(0)
mov ebp, dword [esp + 0x5c]
mov esi, dword [esp + 0x60]
add ebp, dword [esp + 0x24]
mov edx, dword [esp + 0x2c]
add edx, dword [esp + 0x48]
mov dword [esp + 0x2c], edx
mov ecx, dword [esp + 0x34]
add ecx, dword [esp + 0x28]
mov dword [esp + 0x34], ecx
add esi, dword [esp + 0x1c]
add dword [esp + 0x38], 0x190
mov ebx, dword [esp + 0x20]
inc ebx
mov dword [esp + 0x20], ebx
mov dword [esp + 0x78], ebx
fild dword [esp + 0x78]
fcomp st(5)
fnstsw ax
sahf
jb 0x405ffb
fstp st(0)
fstp st(0)
fstp st(0)
fstp st(0)
fstp st(0)
fstp st(0)
mov eax, dword [esp + 0xbc]
call fcn.00406698
xor eax, eax
add esp, 0x84
pop ebx
pop ebp
pop esi
pop edi
ret
fstp st(0)
fstp st(0)
jmp 0x4061e0
fstp st(0)
fstp st(0)
jmp 0x4061e0