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

Disassembly:
push edi
push esi
push ebx
sub esp, 0x10
mov ecx, dword [esp + 0x28]
mov esi, dword [esp + 0x20]
mov ebx, dword [esp + 0x24]
cmp ecx, 0x13
jle 0x4055f0
mov eax, 4
xor edi, edi
nop
add eax, eax
add edi, 1
lea edx, [eax + 0xf]
cmp ecx, edx
jg 0x4055a0
mov dword [esp], edi
call fcn.00407300
lea edx, [esi + 1]
mov dword [eax], edi
movzx ecx, byte [esi]
lea edi, [eax + 4]
mov byte [eax + 4], cl
mov eax, edi
test cl, cl
je 0x4055df
lea esi, [esi]
nop
movzx ecx, byte [edx]
add eax, 1
add edx, 1
mov byte [eax], cl
test cl, cl
jne 0x4055d0
test ebx, ebx
je 0x4055e5
mov dword [ebx], eax
add esp, 0x10
mov eax, edi
pop ebx
pop esi
pop edi
ret
xor edi, edi
jmp 0x4055ac
push ebp
push edi
push esi
push ebx
sub esp, 0xac
mov eax, dword [esp + 0xc4]
mov esi, dword [esp + 0xd0]
mov edi, dword [esp + 0xc0]
mov edx, dword [esp + 0xdc]
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0xc8]
mov dword [esp + 0x1c], esi
mov esi, dword [esp + 0xd4]
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0xcc]
mov dword [esp + 0x28], esi
mov esi, dword [esp + 0xd8]
mov ecx, eax
mov dword [esp + 0x30], eax
mov dword [esp + 0x14], esi
mov esi, dword [eax]
mov dword [esp + 0x2c], edi
mov eax, esi
mov dword [esp + 0x18], edx
and eax, 0xffffffcf
mov dword [ecx], eax
mov eax, esi
and eax, 7
cmp eax, 3
je 0x405b80
mov ecx, esi
and ecx, 4
mov dword [esp + 0x34], ecx
jne 0x405af8
test eax, eax
je 0x405b48
mov edi, dword [edi]
xor edx, edx
mov eax, 0x20
cmp edi, 0x20
jle 0x4058e9
add eax, eax
add edx, 1
cmp edi, eax
jg 0x4058e0
mov dword [esp], edx
lea ebx, [edi - 1]
sar ebx, 5
call fcn.00407300
mov dword [esp + 0x38], ebx
mov ebp, eax
mov eax, dword [esp + 0x20]
lea edx, [ebp + 0x14]
lea ecx, [eax + ebx*4]
lea esi, [esi]
nop
mov ebx, dword [eax]
add eax, 4
add edx, 4
mov dword [edx - 4], ebx
cmp ecx, eax
jae 0x405910
mov eax, dword [esp + 0x20]
mov ebx, dword [esp + 0x38]
add ecx, 1
add eax, 1
lea ebx, [ebx*4 + 4]
cmp ecx, eax
mov eax, 4
cmovb ebx, eax
sar ebx, 2
jmp 0x405950
test ebx, ebx
je 0x405bc0
mov eax, ebx
sub ebx, 1
mov edx, dword [ebp + ebx*4 + 0x14]
test edx, edx
je 0x405948
bsr edx, dword [ebp + ebx*4 + 0x14]
mov dword [ebp + 0x10], eax
shl eax, 5
xor edx, 0x1f
sub eax, edx
mov ebx, eax
mov dword [esp], ebp
call fcn.004071b0
mov ecx, dword [esp + 0x24]
mov dword [esp + 0x9c], eax
mov dword [esp + 0x58], ecx
test eax, eax
jne 0x405bd0
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x405b40
lea eax, [esp + 0x9c]
mov dword [esp], ebp
mov dword [esp + 4], eax
call fcn.00407ce0
mov ecx, dword [esp + 0x58]
fstp qword [esp + 0x38]
mov edx, dword [esp + 0x3c]
mov eax, dword [esp + 0x38]
add ecx, ebx
mov dword [esp + 0x50], ecx
and edx, 0xfffff
mov dword [esp + 0x5c], ecx
sub ecx, 1
or edx, 0x3ff00000
mov dword [esp + 0x40], ecx
mov dword [esp + 0x48], ecx
mov ecx, dword [esp + 0x50]
mov dword [esp + 0x38], eax
mov eax, 1
sub eax, ecx
mov dword [esp + 0x3c], edx
mov ecx, dword [esp + 0x40]
fld qword [esp + 0x38]
fsub dword [0x40a8e8]
fmul qword [str.aCoc]
test ecx, ecx
fadd qword [0x40a8f8]
cmovns eax, ecx
fild dword [esp + 0x48]
fmul qword [0x40a900]
sub eax, 0x435
faddp st(1)
test eax, eax
jle 0x405a34
mov dword [esp + 0x50], eax
fild dword [esp + 0x50]
fmul qword [0x40a908]
faddp st(1)
fnstcw word [esp + 0x8e]
movzx eax, word [esp + 0x8e]
or ah, 0xc
mov word [esp + 0x8c], ax
fldcw word [esp + 0x8c]
fist dword [esp + 0x50]
fldcw word [esp + 0x8e]
fldz
fcompi st(1)
ja 0x405f70
fstp st(0)
mov ecx, dword [esp + 0x40]
mov eax, ecx
shl eax, 0x14
add eax, edx
mov dword [esp + 0x3c], eax
mov eax, ebx
sub eax, ecx
mov ecx, dword [esp + 0x50]
lea edx, [eax - 1]
mov dword [esp + 0x54], edx
cmp ecx, 0x16
ja 0x405bf8
fld qword [ecx*8 + 0x40a960]
fst qword [esp + 0x40]
fld qword [esp + 0x38]
fxch st(1)
fcompi st(1)
fstp st(0)
ja 0x406000
mov dword [esp + 0x78], 0
mov dword [esp + 0x60], 0
test eax, eax
jg 0x405ad8
mov edx, 1
mov dword [esp + 0x54], 0
sub edx, eax
mov dword [esp + 0x60], edx
lea esi, [esi]
mov edx, dword [esp + 0x50]
mov dword [esp + 0x6c], 0
add dword [esp + 0x54], edx
mov dword [esp + 0x64], edx
jmp 0x405c4b
xor ebx, ebx
cmp eax, 4
jne 0x405b70
mov eax, dword [esp + 0x14]
mov dword [eax], 0xffff8000
mov eax, dword [esp + 0x18]
mov dword [esp + 0xc8], 3
mov dword [esp + 0xc4], eax
mov dword [esp + 0xc0], 0x40a8e1
add esp, 0xac
pop ebx
pop esi
pop edi
pop ebp
jmp 0x405580
mov dword [esp], ebp
call fcn.004073e0
mov eax, dword [esp + 0x14]
mov dword [eax], 1
mov eax, dword [esp + 0x18]
mov dword [esp + 8], 1
mov dword [esp + 4], eax
mov dword [esp], 0x40a8e5
call 0x405580
mov ebx, eax
add esp, 0xac
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [esp + 0x14]
mov dword [eax], 0xffff8000
mov eax, dword [esp + 0x18]
mov dword [esp + 0xc8], 8
mov dword [esp + 0xc4], eax
mov dword [esp + 0xc0], str.Infinity
add esp, 0xac
pop ebx
pop esi
pop edi
pop ebp
jmp 0x405580
mov dword [ebp + 0x10], 0
jmp 0x40596f
mov dword [esp + 4], eax
mov dword [esp], ebp
call fcn.00407080
mov eax, dword [esp + 0x9c]
mov edx, dword [esp + 0x24]
add edx, eax
sub ebx, eax
mov dword [esp + 0x58], edx
jmp 0x40598e
mov dword [esp + 0x78], 1
mov edx, dword [esp + 0x54]
mov dword [esp + 0x60], 0
test edx, edx
jns 0x405c23
mov edx, 1
mov dword [esp + 0x54], 0
sub edx, eax
mov dword [esp + 0x60], edx
mov eax, dword [esp + 0x50]
test eax, eax
jns 0x405ad8
mov eax, dword [esp + 0x50]
sub dword [esp + 0x60], eax
mov dword [esp + 0x50], 0
mov edx, eax
mov dword [esp + 0x64], eax
neg edx
mov dword [esp + 0x6c], edx
mov eax, dword [esp + 0x1c]
cmp eax, 9
ja 0x405ed8
cmp eax, 5
jg 0x405f90
mov eax, dword [esp + 0x5c]
add eax, 0x3fd
cmp eax, 0x7f7
setbe al
movzx eax, al
mov dword [esp + 0x70], eax
mov eax, dword [esp + 0x1c]
cmp eax, 4
je 0x4069e1
cmp eax, 5
je 0x406860
cmp eax, 2
jne 0x406370
mov dword [esp + 0x68], 0
mov ecx, dword [esp + 0x28]
mov eax, 1
test ecx, ecx
cmovg eax, ecx
mov dword [esp + 0x7c], eax
mov edx, eax
mov dword [esp + 0x40], eax
mov dword [esp + 0x28], eax
mov dword [esp], eax
mov dword [esp + 0x9c], edx
call fcn.00405540
mov dword [esp + 0x5c], eax
mov eax, dword [esp + 0x2c]
mov eax, dword [eax + 0xc]
sub eax, 1
mov dword [esp + 0x48], eax
je 0x405d07
mov edx, dword [esp + 0x48]
mov eax, 2
test edx, edx
cmovns eax, edx
and esi, 8
mov dword [esp + 0x48], eax
mov edx, eax
je 0x406180
mov eax, 3
sub eax, edx
mov dword [esp + 0x48], eax
mov esi, dword [esp + 0x40]
cmp esi, 0xe
setbe al
and al, byte [esp + 0x70]
mov ecx, eax
je 0x406180
mov eax, dword [esp + 0x64]
or eax, dword [esp + 0x48]
jne 0x406180
fld qword [esp + 0x38]
mov eax, dword [esp + 0x78]
mov dword [esp + 0x9c], 0
fst qword [esp + 0x48]
test eax, eax
je 0x405d54
fld1
fcompi st(1)
ja 0x406c6c
fstp st(0)
jmp 0x405d56
fstp st(0)
fld qword [esp + 0x48]
fadd st(0)
fadd dword [0x40a924]
fstp qword [esp + 0x70]
mov eax, dword [esp + 0x70]
mov edx, dword [esp + 0x74]
mov dword [esp + 0x70], eax
mov eax, edx
sub eax, 0x3400000
mov dword [esp + 0x74], eax
mov eax, dword [esp + 0x40]
test eax, eax
je 0x406130
fld qword [esp + 0x48]
mov esi, dword [esp + 0x40]
mov dword [esp + 0x88], 0
fstp qword [esp + 0x80]
mov eax, dword [esp + 0x68]
fld qword [esp + 0x70]
fld qword [esi*8 + 0x40a958]
test eax, eax
je 0x4063ad
fnstcw word [esp + 0x8e]
fdivr dword [0x40a92c]
mov ecx, dword [esp + 0x5c]
movzx eax, word [esp + 0x8e]
lea edx, [ecx + 1]
or ah, 0xc
mov word [esp + 0x8c], ax
fsubrp st(1)
fld qword [esp + 0x80]
fldcw word [esp + 0x8c]
fist dword [esp + 0x38]
fldcw word [esp + 0x8e]
fild dword [esp + 0x38]
movzx eax, byte [esp + 0x38]
add eax, 0x30
fsubp st(1)
fxch st(1)
mov byte [ecx], al
fcomi st(1)
jbe 0x405e75
fstp st(0)
jmp 0x406e49
mov eax, dword [esp + 0x9c]
add eax, 1
mov dword [esp + 0x9c], eax
cmp eax, esi
jge 0x406158
fld dword [0x40a91c]
add edx, 1
fmul st(1), st(0)
fmulp st(2)
fxch st(1)
fldcw word [esp + 0x8c]
fist dword [esp + 0x38]
fldcw word [esp + 0x8e]
fild dword [esp + 0x38]
movzx eax, byte [esp + 0x38]
add eax, 0x30
fsubp st(1)
fxch st(1)
mov byte [edx - 1], al
fcomi st(1)
ja 0x406e47
fld st(1)
fsubr dword [0x40a918]
fxch st(1)
fcomi st(1)
fstp st(1)
jbe 0x405e20
fstp st(0)
fstp st(0)
movzx ecx, byte [edx - 1]
mov ebx, dword [esp + 0x5c]
jmp 0x405ea6
cmp ebx, eax
je 0x406d77
movzx ecx, byte [eax - 1]
mov edx, eax
lea eax, [edx - 1]
cmp cl, 0x39
je 0x405e98
mov dword [esp + 0x5c], edx
add ecx, 1
mov byte [eax], cl
mov eax, dword [esp + 0x88]
mov dword [esp + 0x34], 0x20
add eax, 1
mov dword [esp + 0x54], eax
jmp 0x4060cd
mov eax, dword [esp + 0x5c]
mov dword [esp + 0x1c], 0
add eax, 0x3fd
cmp eax, 0x7f7
setbe al
movzx eax, al
mov dword [esp + 0x70], eax
mov dword [esp + 0x28], edi
fild dword [esp + 0x28]
fmul qword [0x40a910]
fldcw word [esp + 0x8c]
fistp dword [esp + 0x28]
fldcw word [esp + 0x8e]
mov eax, dword [esp + 0x28]
add eax, 3
mov dword [esp], eax
mov dword [esp + 0x9c], eax
call fcn.00405540
mov dword [esp + 0x5c], eax
mov eax, dword [esp + 0x2c]
mov eax, dword [eax + 0xc]
mov dword [esp + 0x28], eax
sub eax, 1
mov dword [esp + 0x48], eax
je 0x406012
mov dword [esp + 0x28], 0
mov dword [esp + 0x68], 1
mov dword [esp + 0x7c], 0xffffffff
mov dword [esp + 0x40], 0xffffffff
jmp 0x405cdf
fild dword [esp + 0x50]
fucompi st(1)
fstp st(0)
jp 0x405f80
je 0x405a6c
sub dword [esp + 0x50], 1
jmp 0x405a6c
sub eax, 4
mov dword [esp + 0x70], 0
mov dword [esp + 0x1c], eax
cmp eax, 4
je 0x4069e1
cmp eax, 5
je 0x406860
mov dword [esp + 0x68], 0
cmp eax, 2
je 0x405ca0
mov dword [esp + 0x1c], 3
lea esi, [esi]
mov edx, dword [esp + 0x28]
mov eax, dword [esp + 0x64]
add eax, edx
mov edx, 1
mov dword [esp + 0x7c], eax
add eax, 1
test eax, eax
mov dword [esp + 0x40], eax
cmovg edx, eax
mov eax, edx
jmp 0x405cbc
sub dword [esp + 0x50], 1
mov dword [esp + 0x78], 0
jmp 0x405c00
mov eax, dword [esp + 0x58]
mov dword [esp + 0x28], 0
mov dword [esp + 0x40], 0xffffffff
test eax, eax
js 0x406e16
mov dword [esp + 0x68], 1
mov dword [esp + 0x7c], 0xffffffff
nop
mov eax, dword [esp + 0x2c]
mov esi, dword [esp + 0x64]
cmp esi, dword [eax + 0x14]
jg 0x40618c
mov eax, dword [esp + 0x64]
mov edx, dword [esp + 0x28]
fld qword [eax*8 + 0x40a960]
test edx, edx
jns 0x4068ec
mov edi, dword [esp + 0x40]
test edi, edi
jg 0x4068ec
jne 0x406386
fmul dword [0x40a928]
fld qword [esp + 0x38]
fxch st(1)
fcompi st(1)
fstp st(0)
jae 0x406388
add eax, 2
mov dword [esp + 0x38], 0
mov ebx, dword [esp + 0x5c]
xor esi, esi
mov dword [esp + 0x54], eax
add dword [esp + 0x5c], 1
mov byte [ebx], 0x31
mov dword [esp + 0x34], 0x20
mov eax, dword [esp + 0x38]
mov dword [esp], eax
call fcn.004073e0
test esi, esi
je 0x4060cd
mov dword [esp], esi
call fcn.004073e0
mov dword [esp], ebp
call fcn.004073e0
mov esi, dword [esp + 0x14]
mov eax, dword [esp + 0x5c]
mov edi, dword [esp + 0x54]
mov byte [eax], 0
mov dword [esi], edi
mov esi, dword [esp + 0x18]
test esi, esi
je 0x4060f0
mov dword [esi], eax
mov eax, dword [esp + 0x30]
mov esi, dword [esp + 0x34]
or dword [eax], esi
add esp, 0xac
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret
fstp st(0)
fld qword [esp + 0x48]
fadd st(0)
fadd dword [0x40a924]
fstp qword [esp + 0x38]
mov eax, dword [esp + 0x38]
mov edx, dword [esp + 0x3c]
mov dword [esp + 0x70], eax
mov eax, edx
sub eax, 0x3400000
mov dword [esp + 0x74], eax
fld qword [esp + 0x48]
fsub dword [0x40a928]
fld qword [esp + 0x70]
fxch st(1)
fcomi st(1)
ja 0x406d20
fxch st(1)
fchs
fcompi st(1)
fstp st(0)
ja 0x406388
jmp 0x406160
fstp st(0)
fstp st(0)
jmp 0x406160
fstp st(0)
mov eax, dword [esp + 0x48]
mov edx, dword [esp + 0x4c]
mov dword [esp + 0x48], 0
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], edx
lea esi, [esi]
nop
mov ecx, dword [esp + 0x58]
test ecx, ecx
jns 0x406040
mov eax, dword [esp + 0x68]
test eax, eax
je 0x4064a0
mov esi, dword [esp + 0x2c]
sub edi, ebx
lea eax, [edi + 1]
mov edx, dword [esi + 4]
mov esi, dword [esp + 0x58]
mov dword [esp + 0x9c], eax
mov ecx, esi
sub ecx, edi
cmp ecx, edx
jge 0x4068a8
mov edi, dword [esp + 0x1c]
lea eax, [edi - 3]
and eax, 0xfffffffd
je 0x4068b3
mov eax, esi
mov esi, dword [esp + 0x40]
sub eax, edx
add eax, 1
cmp edi, 1
setg cl
test esi, esi
mov dword [esp + 0x9c], eax
setg dl
test cl, dl
je 0x4061f4
cmp eax, esi
jg 0x406f7b
mov esi, dword [esp + 0x60]
add dword [esp + 0x54], eax
mov edx, dword [esp + 0x6c]
add eax, esi
mov edi, esi
mov dword [esp + 0x60], eax
mov dword [esp], 1
mov dword [esp + 0x38], edx
call fcn.00407530
mov dword [esp + 0x68], 1
mov edx, dword [esp + 0x38]
mov esi, eax
test edi, edi
jle 0x40624c
mov ecx, dword [esp + 0x54]
test ecx, ecx
jle 0x40624c
cmp edi, ecx
mov eax, ecx
cmovle eax, edi
sub dword [esp + 0x60], eax
sub ecx, eax
mov dword [esp + 0x9c], eax
sub edi, eax
mov dword [esp + 0x54], ecx
mov eax, dword [esp + 0x6c]
test eax, eax
je 0x406276
mov eax, dword [esp + 0x68]
test eax, eax
je 0x406264
test edx, edx
jne 0x406ab1
mov eax, dword [esp + 0x6c]
mov dword [esp], ebp
mov dword [esp + 4], eax
call fcn.00407780
mov ebp, eax
mov dword [esp], 1
call fcn.00407530
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0x50]
test eax, eax
jne 0x406820
cmp dword [esp + 0x1c], 1
jle 0x406870
mov ebx, 0x1f
mov eax, dword [esp + 0x54]
mov edx, dword [esp + 0x60]
sub ebx, eax
sub ebx, 4
and ebx, 0x1f
add edx, ebx
mov dword [esp + 0x9c], ebx
mov eax, ebx
test edx, edx
jle 0x4062d6
mov dword [esp], ebp
mov dword [esp + 4], edx
call fcn.00407900
mov ebp, eax
mov eax, dword [esp + 0x9c]
mov edx, dword [esp + 0x54]
add edx, eax
test edx, edx
jle 0x4062f4
mov eax, dword [esp + 0x38]
mov dword [esp + 4], edx
mov dword [esp], eax
call fcn.00407900
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0x78]
cmp dword [esp + 0x1c], 2
setg dl
test eax, eax
jne 0x4066e0
mov eax, dword [esp + 0x40]
test eax, eax
jg 0x4064b0
test dl, dl
je 0x4064b0
mov eax, dword [esp + 0x40]
test eax, eax
jne 0x406392
mov eax, dword [esp + 0x38]
mov dword [esp + 8], 0
mov dword [esp + 4], 5
mov dword [esp], eax
call fcn.00407450
mov dword [esp], ebp
mov dword [esp + 4], eax
mov dword [esp + 0x38], eax
call fcn.00407a40
test eax, eax
jle 0x406392
mov eax, dword [esp + 0x64]
mov ebx, dword [esp + 0x5c]
add eax, 2
mov dword [esp + 0x54], eax
jmp 0x4060a5
cmp eax, 3
jne 0x405ef8
mov dword [esp + 0x68], 0
jmp 0x405fd0
fstp st(0)
mov dword [esp + 0x38], 0
xor esi, esi
mov eax, dword [esp + 0x28]
mov ebx, dword [esp + 0x5c]
mov dword [esp + 0x34], 0x10
neg eax
mov dword [esp + 0x54], eax
jmp 0x4060b5
fnstcw word [esp + 0x8e]
fmulp st(1)
fld qword [esp + 0x38]
mov dword [esp + 0x70], ebp
mov dword [esp + 0x9c], 1
mov edx, dword [esp + 0x5c]
xor edi, edi
mov ebp, ecx
movzx eax, word [esp + 0x8e]
fld st(0)
or ah, 0xc
mov word [esp + 0x8c], ax
jmp 0x406402
add eax, 1
fmul dword [0x40a91c]
mov edi, ebp
mov dword [esp + 0x9c], eax
fldcw word [esp + 0x8c]
fist dword [esp + 0x38]
fldcw word [esp + 0x8e]
mov ecx, dword [esp + 0x38]
test ecx, ecx
je 0x406424
fild dword [esp + 0x38]
mov edi, ebp
fsubp st(1)
add edx, 1
add ecx, 0x30
mov byte [edx - 1], cl
mov eax, dword [esp + 0x9c]
cmp eax, esi
jne 0x4063f0
mov eax, edi
mov ebp, dword [esp + 0x70]
test al, al
fcmove st(0), st(1)
fstp st(1)
fld dword [0x40a92c]
fld st(2)
fadd st(1)
fxch st(2)
fcomi st(2)
fstp st(2)
ja 0x406e38
fsubrp st(2)
fxch st(1)
fcompi st(1)
ja 0x406f40
fstp st(0)
mov eax, dword [esp + 0x48]
mov edx, dword [esp + 0x4c]
mov edi, dword [esp + 0x58]
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], edx
test edi, edi
js 0x406fd5
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x48], 0
mov esi, dword [eax + 0x14]
test esi, esi
jns 0x406051
lea esi, [esi]
nop
mov edx, dword [esp + 0x6c]
mov edi, dword [esp + 0x60]
xor esi, esi
jmp 0x406226
mov eax, dword [esp + 0x64]
add eax, 1
mov dword [esp + 0x54], eax
mov eax, dword [esp + 0x68]
test eax, eax
je 0x406760
add ebx, edi
test ebx, ebx
jle 0x4064db
mov dword [esp], esi
mov dword [esp + 4], ebx
call fcn.00407900
mov esi, eax
mov eax, dword [esp + 0x50]
mov dword [esp + 0x24], esi
test eax, eax
jne 0x406cda
mov eax, dword [esp + 0x5c]
mov dword [esp + 0x28], eax
mov eax, 1
jmp 0x4065c7
mov dword [esp], edx
call fcn.004073e0
mov eax, 1
test ebx, ebx
js 0x406b58
or ebx, dword [esp + 0x1c]
jne 0x406528
mov ecx, dword [esp + 0x20]
test byte [ecx], 1
je 0x406b58
mov edx, dword [esp + 0x28]
lea edi, [edx + 1]
mov ebx, edi
test eax, eax
jle 0x406540
cmp dword [esp + 0x48], 2
jne 0x406d3f
movzx eax, byte [esp + 0x2c]
mov byte [edi - 1], al
mov eax, dword [esp + 0x40]
cmp dword [esp + 0x9c], eax
je 0x406d68
mov dword [esp], ebp
mov dword [esp + 8], 0
mov dword [esp + 4], 0xa
call fcn.00407450
mov dword [esp + 8], 0
mov ebp, eax
mov eax, dword [esp + 0x24]
mov dword [esp + 4], 0xa
mov dword [esp], esi
cmp esi, eax
je 0x4066d0
call fcn.00407450
mov dword [esp + 8], 0
mov esi, eax
mov eax, dword [esp + 0x24]
mov dword [esp + 4], 0xa
mov dword [esp], eax
call fcn.00407450
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x9c]
mov dword [esp + 0x28], edi
add eax, 1
mov dword [esp + 0x9c], eax
mov eax, dword [esp + 0x38]
mov dword [esp], ebp
mov dword [esp + 4], eax
call fcn.00405620
mov dword [esp + 4], esi
mov dword [esp], ebp
lea ecx, [eax + 0x30]
mov edi, eax
mov dword [esp + 0x2c], ecx
call fcn.00407a40
mov ecx, dword [esp + 0x24]
mov ebx, eax
mov eax, dword [esp + 0x38]
mov dword [esp + 4], ecx
mov dword [esp], eax
call fcn.00407a90
mov edx, eax
mov eax, dword [eax + 0xc]
test eax, eax
jne 0x406500
mov dword [esp + 4], edx
mov dword [esp], ebp
mov dword [esp + 0x58], edx
call fcn.00407a40
mov edx, dword [esp + 0x58]
mov dword [esp + 0x50], eax
mov dword [esp], edx
call fcn.004073e0
mov eax, dword [esp + 0x50]
mov ecx, dword [esp + 0x1c]
or eax, ecx
jne 0x4069d8
mov ecx, dword [esp + 0x20]
mov edx, dword [ecx]
mov dword [esp + 0x50], edx
and edx, 1
or edx, dword [esp + 0x48]
jne 0x40650d
mov ecx, dword [esp + 0x2c]
cmp ecx, 0x39
je 0x406df7
test ebx, ebx
jle 0x407055
mov dword [esp + 0x34], 0x20
lea ecx, [edi + 0x31]
mov eax, dword [esp + 0x28]
mov edx, esi
mov esi, dword [esp + 0x24]
mov byte [eax], cl
lea edi, [eax + 1]
lea esi, [esi]
mov eax, dword [esp + 0x38]
mov dword [esp + 0x1c], edx
mov dword [esp], eax
call fcn.004073e0
test esi, esi
je 0x406a1f
mov edx, dword [esp + 0x1c]
test edx, edx
je 0x4066bc
cmp edx, esi
je 0x4066bc
mov dword [esp], edx
call fcn.004073e0
mov ebx, dword [esp + 0x5c]
mov dword [esp + 0x5c], edi
jmp 0x4060c5
call fcn.00407450
mov dword [esp + 0x24], eax
mov esi, eax
jmp 0x4065b9
mov eax, dword [esp + 0x38]
mov dword [esp], ebp
mov byte [esp + 0x24], dl
mov dword [esp + 4], eax
call fcn.00407a40
movzx edx, byte [esp + 0x24]
test eax, eax
jns 0x406308
mov dword [esp], ebp
mov eax, dword [esp + 0x64]
mov dword [esp + 8], 0
mov dword [esp + 4], 0xa
sub eax, 1
mov dword [esp + 0x2c], eax
call fcn.00407450
mov edx, dword [esp + 0x7c]
mov ecx, dword [esp + 0x68]
mov ebp, eax
test edx, edx
movzx edx, byte [esp + 0x24]
setle al
and edx, eax
test ecx, ecx
jne 0x406ee2
test dl, dl
jne 0x406e23
mov eax, dword [esp + 0x64]
mov dword [esp + 0x54], eax
mov eax, dword [esp + 0x7c]
mov dword [esp + 0x40], eax
lea esi, [esi]
mov dword [esp + 0x1c], esi
mov ebx, dword [esp + 0x5c]
mov eax, 1
mov edi, dword [esp + 0x38]
mov esi, dword [esp + 0x40]
jmp 0x4067a4
mov dword [esp], ebp
mov dword [esp + 8], 0
mov dword [esp + 4], 0xa
call fcn.00407450
mov ebp, eax
mov eax, dword [esp + 0x9c]
add eax, 1
mov dword [esp + 4], edi
add ebx, 1
mov dword [esp], ebp
mov dword [esp + 0x9c], eax
call fcn.00405620
add eax, 0x30
mov byte [ebx - 1], al
cmp dword [esp + 0x9c], esi
jl 0x406780
mov esi, dword [esp + 0x1c]
mov ecx, eax
xor edx, edx
mov edi, dword [esp + 0x48]
test edi, edi
je 0x406af2
mov eax, dword [ebp + 0x10]
cmp edi, 2
je 0x406b37
cmp eax, 1
jg 0x4069ee
mov eax, dword [ebp + 0x14]
test eax, eax
jne 0x4069ee
test eax, eax
setne al
movzx eax, al
shl eax, 4
mov dword [esp + 0x34], eax
lea esi, [esi]
mov edi, ebx
sub ebx, 1
cmp byte [ebx], 0x30
je 0x406810
jmp 0x406690
mov eax, dword [esp + 0x50]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x38]
mov dword [esp], eax
call fcn.00407780
cmp dword [esp + 0x1c], 1
mov dword [esp + 0x38], eax
jle 0x406a5e
mov dword [esp + 0x50], 0
mov ebx, dword [esp + 0x38]
mov eax, dword [ebx + 0x10]
bsr ebx, dword [ebx + eax*4 + 0x10]
xor ebx, 0x1f
jmp 0x4062a2
mov dword [esp + 0x68], 1
jmp 0x405fd0
cmp ebx, 1
jne 0x40629d
mov eax, dword [esp + 0x2c]
mov eax, dword [eax + 4]
add eax, 1
cmp dword [esp + 0x24], eax
jle 0x40629d
add dword [esp + 0x60], 1
add dword [esp + 0x54], 1
mov dword [esp + 0x50], 1
jmp 0x40629d
cmp dword [esp + 0x1c], 1
jle 0x4061f4
mov edi, dword [esp + 0x40]
mov esi, dword [esp + 0x6c]
lea eax, [edi - 1]
cmp esi, eax
jl 0x406a2c
mov edx, esi
sub edx, eax
test edi, edi
jns 0x406f22
mov edi, dword [esp + 0x60]
mov eax, dword [esp + 0x40]
mov dword [esp + 0x9c], 0
sub edi, eax
jmp 0x406208
fnstcw word [esp + 0x8e]
fld qword [esp + 0x38]
mov esi, dword [esp + 0x5c]
mov dword [esp + 0x9c], 1
movzx eax, word [esp + 0x8e]
lea edx, [esi + 1]
fld st(0)
fdiv st(2)
or ah, 0xc
mov word [esp + 0x8c], ax
fldcw word [esp + 0x8c]
fistp dword [esp + 0x1c]
fldcw word [esp + 0x8e]
fild dword [esp + 0x1c]
movzx eax, byte [esp + 0x1c]
add eax, 0x30
fmul st(2)
mov byte [esi], al
mov eax, dword [esp + 0x64]
add eax, 1
mov dword [esp + 0x54], eax
fsubp st(1)
fldz
fxch st(1)
fucomi st(1)
fstp st(1)
jp 0x406978
lea esi, [esi]
jne 0x406978
fstp st(0)
fstp st(0)
mov ebx, dword [esp + 0x5c]
mov dword [esp + 0x5c], edx
jmp 0x4060cd
mov eax, dword [esp + 0x9c]
mov esi, dword [esp + 0x40]
cmp eax, esi
je 0x406c3e
fmul dword [0x40a91c]
add eax, 1
add edx, 1
mov dword [esp + 0x9c], eax
fld st(0)
fdiv st(2)
fldcw word [esp + 0x8c]
fistp dword [esp + 0x1c]
fldcw word [esp + 0x8e]
fild dword [esp + 0x1c]
movzx eax, byte [esp + 0x1c]
add eax, 0x30
fmul st(2)
mov byte [edx - 1], al
fsubp st(1)
fldz
fxch st(1)
fucomi st(1)
fstp st(1)
jnp 0x406960
jmp 0x406978
mov eax, dword [esp + 0x50]
jmp 0x40650d
mov dword [esp + 0x68], 1
jmp 0x405ca0
mov ecx, dword [esp + 0x5c]
jmp 0x406a00
cmp ecx, ebx
je 0x406a98
mov edi, ebx
lea ebx, [ebx - 1]
movzx eax, byte [edi - 1]
cmp al, 0x39
je 0x4069f8
add eax, 1
mov dword [esp + 0x34], 0x20
mov byte [ebx], al
jmp 0x406690
mov ebx, dword [esp + 0x5c]
mov dword [esp + 0x5c], edi
jmp 0x4060cd
mov esi, dword [esp + 0x40]
mov ecx, dword [esp + 0x60]
mov edx, eax
mov edi, dword [esp + 0x6c]
add dword [esp + 0x54], esi
mov dword [esp + 0x9c], esi
add esi, ecx
sub edx, edi
mov dword [esp + 0x60], esi
mov edi, ecx
add dword [esp + 0x50], edx
xor edx, edx
mov dword [esp + 0x6c], eax
jmp 0x406208
cmp ebx, 1
jne 0x406843
mov eax, dword [esp + 0x2c]
mov eax, dword [eax + 4]
add eax, 1
cmp dword [esp + 0x24], eax
jle 0x406843
add dword [esp + 0x60], 1
add dword [esp + 0x54], 1
mov dword [esp + 0x50], 1
jmp 0x40684b
mov eax, dword [esp + 0x5c]
add dword [esp + 0x54], 1
mov dword [esp + 0x34], 0x20
mov byte [eax], 0x31
jmp 0x406690
mov dword [esp + 4], edx
mov dword [esp], esi
mov dword [esp + 0x58], edx
call fcn.00407780
mov dword [esp + 4], ebp
mov dword [esp], eax
mov esi, eax
call fcn.004075e0
mov dword [esp], ebp
mov dword [esp + 0x38], eax
call fcn.004073e0
mov edx, dword [esp + 0x58]
sub dword [esp + 0x6c], edx
mov ebp, dword [esp + 0x38]
je 0x406276
jmp 0x406264
mov dword [esp], ebp
mov dword [esp + 4], 1
mov dword [esp + 0x1c], edx
mov dword [esp + 0x20], ecx
call fcn.00407900
mov ebp, eax
mov eax, dword [esp + 0x38]
mov dword [esp], ebp
mov dword [esp + 4], eax
call fcn.00407a40
mov edx, dword [esp + 0x1c]
test eax, eax
jg 0x4069ee
jne 0x406b37
mov ecx, dword [esp + 0x20]
and ecx, 1
jne 0x4069ee
cmp dword [ebp + 0x10], 1
mov dword [esp + 0x34], 0x10
jg 0x406810
mov eax, dword [ebp + 0x14]
jmp 0x4067fd
mov ebx, dword [esp + 0x48]
mov ecx, dword [esp + 0x2c]
test ebx, ebx
je 0x406d8d
cmp dword [ebp + 0x10], 1
jle 0x406fb0
cmp dword [esp + 0x48], 2
je 0x406ddd
mov ebx, dword [esp + 0x24]
mov edi, dword [esp + 0x28]
mov dword [esp + 0x1c], ecx
jmp 0x406bf6
movzx eax, byte [esp + 0x1c]
mov dword [esp + 0x24], ecx
mov byte [ecx - 1], al
mov dword [esp], ebx
mov dword [esp + 8], 0
mov dword [esp + 4], 0xa
call fcn.00407450
mov dword [esp], ebp
cmp esi, ebx
mov dword [esp + 8], 0
cmove esi, eax
mov dword [esp + 4], 0xa
mov dword [esp + 0x20], eax
call fcn.00407450
mov ebp, eax
mov eax, dword [esp + 0x38]
mov dword [esp], ebp
mov dword [esp + 4], eax
call fcn.00405620
mov edi, dword [esp + 0x24]
mov ebx, dword [esp + 0x20]
add eax, 0x30
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x38]
mov dword [esp + 4], ebx
mov dword [esp], eax
call fcn.00407a40
lea ecx, [edi + 1]
test eax, eax
jg 0x406b90
mov dword [esp + 0x28], edi
mov edi, ecx
mov ecx, dword [esp + 0x1c]
mov dword [esp + 0x24], ebx
cmp ecx, 0x39
je 0x406dfe
mov dword [esp + 0x34], 0x20
mov edx, esi
add ecx, 1
mov esi, ebx
mov eax, dword [esp + 0x28]
mov byte [eax], cl
jmp 0x406690
mov eax, dword [esp + 0x48]
test eax, eax
je 0x406e7e
fstp st(0)
fstp st(0)
cmp eax, 1
je 0x406f63
mov ebx, dword [esp + 0x5c]
mov dword [esp + 0x34], 0x10
mov dword [esp + 0x5c], edx
jmp 0x4060cd
test esi, esi
je 0x406107
mov esi, dword [esp + 0x7c]
test esi, esi
jle 0x40615e
mov dword [esp + 0x88], 0xffffffff
fmul dword [0x40a91c]
fst qword [esp + 0x80]
mov eax, dword [esp + 0x80]
mov edx, dword [esp + 0x84]
fmul dword [0x40a920]
fadd dword [0x40a924]
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], edx
fstp qword [esp + 0x70]
mov eax, dword [esp + 0x70]
mov edx, dword [esp + 0x74]
mov dword [esp + 0x70], eax
mov eax, edx
sub eax, 0x3400000
mov dword [esp + 0x74], eax
jmp 0x405da3
mov eax, dword [esi + 4]
mov dword [esp], eax
call fcn.00407300
lea ecx, [eax + 0xc]
mov ebx, eax
mov eax, dword [esi + 0x10]
mov dword [esp], ecx
lea edx, [eax*4 + 8]
lea eax, [esi + 0xc]
mov dword [esp + 8], edx
mov dword [esp + 4], eax
call sub.msvcrt.dll_memcpy
mov dword [esp + 4], 1
mov dword [esp], ebx
call fcn.00407900
mov dword [esp + 0x24], eax
jmp 0x4064eb
fstp st(0)
fstp st(0)
mov dword [esp + 0x54], 2
mov ebx, dword [esp + 0x5c]
xor esi, esi
mov dword [esp + 0x38], 0
jmp 0x4060a5
mov ecx, dword [esp + 0x2c]
cmp ecx, 0x39
je 0x406dfe
mov eax, dword [esp + 0x28]
add ecx, 1
mov edx, esi
mov dword [esp + 0x34], 0x20
mov esi, dword [esp + 0x24]
mov byte [eax], cl
jmp 0x406690
mov edx, esi
mov ecx, dword [esp + 0x2c]
mov esi, dword [esp + 0x24]
jmp 0x4067d1
add dword [esp + 0x88], 1
mov ecx, 0x31
mov dword [esp + 0x5c], edx
jmp 0x405eb5
test eax, eax
jle 0x406dd3
mov dword [esp], ebp
mov dword [esp + 4], 1
mov dword [esp + 0x1c], ecx
call fcn.00407900
mov ebp, eax
mov eax, dword [esp + 0x38]
mov dword [esp], ebp
mov dword [esp + 4], eax
call fcn.00407a40
mov ecx, dword [esp + 0x1c]
test eax, eax
jle 0x407029
cmp ecx, 0x39
je 0x406df7
mov dword [esp + 0x48], 0x20
lea ecx, [edi + 0x31]
cmp dword [ebp + 0x10], 1
jle 0x406fec
mov edx, esi
mov esi, dword [esp + 0x24]
mov eax, dword [esp + 0x28]
mov dword [esp + 0x34], 0x10
lea edi, [eax + 1]
jmp 0x406c33
mov eax, dword [esp + 0x28]
lea edi, [eax + 1]
mov eax, dword [esp + 0x28]
mov edx, esi
mov ecx, dword [esp + 0x5c]
mov ebx, edi
mov esi, dword [esp + 0x24]
mov byte [eax], 0x39
jmp 0x406a00
mov dword [esp + 0x7c], 0xffffffff
jmp 0x406198
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x64], eax
mov eax, dword [esp + 0x7c]
mov dword [esp + 0x40], eax
jmp 0x40631c
fstp st(0)
fstp st(0)
fstp st(0)
mov ebx, dword [esp + 0x5c]
jmp 0x405ea6
fstp st(0)
fldz
xor eax, eax
mov ecx, 1
mov ebx, dword [esp + 0x5c]
fucompi st(1)
fstp st(0)
mov dword [esp + 0x5c], edx
setp al
cmovne eax, ecx
shl eax, 4
mov dword [esp + 0x34], eax
mov eax, dword [esp + 0x88]
add eax, 1
mov dword [esp + 0x54], eax
jmp 0x4060cd
fadd st(0)
movzx ecx, byte [edx - 1]
fcomi st(1)
ja 0x407011
fucompi st(1)
fstp st(0)
mov ebx, dword [esp + 0x5c]
mov eax, dword [esp + 0x64]
jp 0x407041
jne 0x407041
test byte [esp + 0x1c], 1
mov dword [esp + 0x88], eax
jne 0x405ea6
mov dword [esp + 0x34], 0x10
nop
mov eax, edx
lea edx, [edx - 1]
cmp byte [eax - 1], 0x30
je 0x406ec0
mov dword [esp + 0x5c], eax
mov eax, dword [esp + 0x88]
add eax, 1
mov dword [esp + 0x54], eax
jmp 0x4060cd
mov dword [esp], esi
mov dword [esp + 8], 0
mov dword [esp + 4], 0xa
mov byte [esp + 0x24], dl
call fcn.00407450
movzx edx, byte [esp + 0x24]
mov esi, eax
test dl, dl
jne 0x406e23
mov eax, dword [esp + 0x64]
mov dword [esp + 0x54], eax
mov eax, dword [esp + 0x7c]
mov dword [esp + 0x40], eax
jmp 0x4064c7
mov esi, dword [esp + 0x60]
mov eax, edi
add dword [esp + 0x54], edi
mov dword [esp + 0x9c], edi
add eax, esi
mov edi, esi
mov dword [esp + 0x60], eax
jmp 0x406208
fldz
xor eax, eax
mov ecx, 1
mov ebx, dword [esp + 0x5c]
fucompi st(1)
fstp st(0)
setp al
cmovne eax, ecx
shl eax, 4
mov dword [esp + 0x34], eax
jmp 0x406ec0
mov eax, dword [esp + 0x64]
movzx ecx, byte [edx - 1]
mov ebx, dword [esp + 0x5c]
mov dword [esp + 0x88], eax
jmp 0x405ea6
mov edi, dword [esp + 0x40]
mov esi, dword [esp + 0x6c]
lea eax, [edi - 1]
cmp esi, eax
jl 0x406a2c
sub esi, eax
mov eax, edi
add dword [esp + 0x54], edi
mov edx, esi
mov esi, dword [esp + 0x60]
mov dword [esp + 0x9c], edi
add eax, esi
mov edi, esi
mov dword [esp + 0x60], eax
jmp 0x406208
mov edx, dword [ebp + 0x14]
test edx, edx
jne 0x406b72
test eax, eax
jg 0x406d91
mov eax, dword [esp + 0x28]
mov edx, esi
mov esi, dword [esp + 0x24]
lea edi, [eax + 1]
jmp 0x406c33
mov dword [esp + 0x48], 0
mov edx, dword [esp + 0x6c]
xor esi, esi
mov edi, dword [esp + 0x60]
jmp 0x406226
mov ebx, dword [ebp + 0x14]
mov edx, esi
mov esi, dword [esp + 0x24]
test ebx, ebx
jne 0x406de3
mov eax, dword [esp + 0x48]
mov dword [esp + 0x34], eax
mov eax, dword [esp + 0x28]
lea edi, [eax + 1]
jmp 0x406c33
fstp st(0)
fstp st(0)
mov eax, dword [esp + 0x64]
mov ebx, dword [esp + 0x5c]
mov dword [esp + 0x88], eax
jmp 0x405ea6
jne 0x407034
test cl, 1
jne 0x406dc3
mov dword [esp + 0x48], 0x20
jmp 0x406dd3
mov dword [esp + 0x88], eax
mov dword [esp + 0x34], 0x10
jmp 0x406ec0
cmp dword [ebp + 0x10], 1
mov dword [esp + 0x34], 0x10
jg 0x40667d
xor eax, eax
cmp dword [ebp + 0x14], 0
setne al
shl eax, 4
mov dword [esp + 0x34], eax
jmp 0x40667d