Function at 0x51a430
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5cad4a
mov eax, dword fs:[0]
push eax
sub esp, 0x18c
mov eax, dword [0x623ec0]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
push 0x100
lea eax, [ebp - 0x110]
push 0
push eax
call fcn.00468b40
add esp, 0xc
cmp dword [edi + 0x1a8860], 0
je 0x51a5d8
push 0xf7c
call fcn.0046677d
mov esi, eax
mov dword [ebp - 0x198], esi
mov dword [ebp - 4], 0
push 0xf7c
push 0
push esi
call fcn.00468b40
add esp, 8
push 0x7df1b0
push 0x7df130
push 0x7df0b0
push 0x7df030
push 0x7defb0
push ecx
mov ecx, esi
call fcn.004c97f0
mov esi, eax
mov dword [ebp - 4], 0xffffffff
mov ecx, dword [esi]
push 0x338
mov edx, dword [ecx + 0x44]
mov ecx, esi
call edx
mov ecx, dword [esi]
sub esp, 8
mov edx, dword [ecx + 0x70]
mov ecx, esi
mov dword [esp + 4], 0x41e00000
mov dword [esp], 0x40800000
call edx
mov ecx, dword [edi + 0x1a8868]
mov dword [esi + 4], ecx
mov eax, dword [ecx + 0x10]
mov dword [esi + 0xc], eax
mov dword [ecx + 0x10], esi
mov eax, dword [esi + 0xc]
test eax, eax
je 0x51a51b
mov dword [eax + 8], esi
push 0xb8
call fcn.0046677d
mov esi, eax
mov dword [ebp - 0x198], esi
mov dword [ebp - 4], 1
push 0xb8
push 0
push esi
call fcn.00468b40
movss xmm3, dword [0x605274]
add esp, 0xc
movss xmm2, dword [0x60524c]
mov ecx, esi
movss xmm1, dword [0x605000]
mov dword [esp], 0x41800000
call fcn.004cedd0
mov byte [ebp - 4], 2
mov dword [esi], vtable.SButtonBox.0
mov dword [ebp - 4], 0xffffffff
mov ecx, esi
mov dword [edi + 0x1a8890], esi
mov eax, dword [esi]
push 0x33a
call dword [eax + 0x44]
mov ecx, dword [edi + 0x1a8890]
mov eax, dword [ecx]
mov edx, dword [eax + 0x50]
mov eax, dword [edi + 0x28]
test eax, eax
je 0x51a5a4
add eax, 0x24
jmp 0x51a5a6
xor eax, eax
push eax
call edx
mov edx, dword [edi + 0x1a8890]
mov ecx, dword [edi + 0x1a8868]
mov dword [edx + 4], ecx
mov eax, dword [ecx + 0x10]
mov dword [edx + 0xc], eax
mov dword [ecx + 0x10], edx
mov eax, dword [edx + 0xc]
test eax, eax
je 0x51a5cb
mov dword [eax + 8], edx
mov ecx, dword [edi + 0x1a8860]
push 0
mov eax, dword [ecx]
call dword [eax + 0x60]
mov ecx, dword [edi + 0x28]
push 0x360
mov eax, dword [ecx]
call dword [eax + 0x48]
mov ebx, dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
mov dword [edi + 0x1a87d0], eax
test eax, eax
je 0x51ac39
mov ecx, dword [edi + 0x28]
push 0x361
mov eax, dword [ecx]
call dword [eax + 0x48]
mov ecx, dword [edi + 0x28]
mov dword [edi + 0x1a8814], eax
push 0x363
mov eax, dword [ecx]
call dword [eax + 0x48]
mov dword [edi + 0x1a87d4], eax
mov ecx, dword [edi + 0x28]
push 0x364
mov eax, dword [ecx]
call dword [eax + 0x48]
mov dword [edi + 0x1a87e4], eax
mov ecx, dword [edi + 0x28]
push 0x365
mov eax, dword [ecx]
call dword [eax + 0x48]
mov dword [edi + 0x1a87d8], eax
mov ecx, dword [edi + 0x28]
push 0x366
mov eax, dword [ecx]
call dword [eax + 0x48]
mov dword [edi + 0x1a87e8], eax
mov ecx, dword [edi + 0x28]
push 0x367
mov eax, dword [ecx]
call dword [eax + 0x48]
mov dword [edi + 0x1a87dc], eax
mov ecx, dword [edi + 0x28]
push 0x368
mov eax, dword [ecx]
call dword [eax + 0x48]
mov dword [edi + 0x1a87ec], eax
mov ecx, dword [edi + 0x28]
push 0x369
mov eax, dword [ecx]
call dword [eax + 0x48]
mov dword [edi + 0x1a87e0], eax
mov ecx, dword [edi + 0x28]
push 0x36a
mov eax, dword [ecx]
call dword [eax + 0x48]
mov dword [edi + 0x1a87f0], eax
mov ecx, dword [edi + 0x28]
push 0x36b
mov eax, dword [ecx]
call dword [eax + 0x48]
mov ecx, dword [edi + 0x28]
mov dword [edi + 0x1a8818], eax
push 0x36e
mov eax, dword [ecx]
call dword [eax + 0x48]
movss xmm0, dword [0x626b1c]
sub esp, 8
mulss xmm0, dword [0x6053e8]
mov dword [edi + 0x1a881c], eax
mov byte [eax + 0x1ec], 1
mov eax, dword [edi + 0x1a881c]
movss dword [esp + 4], xmm0
movss xmm0, dword [0x626b18]
mulss xmm0, dword [0x6053ec]
mov byte [eax + 0x1ed], 1
mov eax, dword [edi + 0x1a881c]
movss dword [esp], xmm0
mov ecx, dword [eax + 0x1f0]
mov eax, dword [ecx]
call dword [eax + 0x70]
movss xmm0, dword [0x626b1c]
sub esp, 8
mov eax, dword [edi + 0x1a8818]
mulss xmm0, dword [0x6053e8]
mov ecx, dword [eax + 0x1f0]
movss dword [esp + 4], xmm0
movss xmm0, dword [0x626b18]
mulss xmm0, dword [0x6053ec]
mov eax, dword [ecx]
movss dword [esp], xmm0
call dword [eax + 0x70]
mov eax, dword [edi + 0x1a881c]
movss xmm3, dword [0x626b18]
movss xmm2, dword [0x626b1c]
movaps xmm0, xmm3
mulss xmm0, dword [0x605280]
mov byte [eax + 0x1ec], 0
mov eax, dword [edi + 0x27d70]
mulss xmm3, dword [0x605284]
addss xmm0, dword [eax + 0x4c]
mov eax, dword [edi + 0x1a8818]
movss dword [eax + 0x4c], xmm0
movaps xmm0, xmm2
mov eax, dword [edi + 0x27d70]
mulss xmm0, dword [0x6051a0]
mulss xmm2, dword [0x605190]
movss xmm1, dword [eax + 0x50]
mov eax, dword [edi + 0x1a8818]
subss xmm1, xmm0
movss dword [eax + 0x50], xmm1
mov eax, dword [edi + 0x1a8818]
mov byte [eax + 0x1ed], 1
mov eax, dword [edi + 0x27d70]
addss xmm3, dword [eax + 0x4c]
mov eax, dword [edi + 0x1a881c]
movss dword [eax + 0x4c], xmm3
mov eax, dword [edi + 0x27d70]
movss xmm0, dword [eax + 0x50]
mov eax, dword [edi + 0x1a881c]
subss xmm0, xmm2
movss dword [eax + 0x50], xmm0
mov eax, dword [0x6345e4]
test eax, eax
jne 0x51a821
push str.interface.txt
push str.LangPT_s
jmp 0x51a830
cmp eax, 1
jne 0x51a844
push str.interface.txt
push str.LangEN_s
lea eax, [ebp - 0x110]
push 0x80
push eax
call fcn.004459c0
add esp, 0x10
lea eax, [ebp - 0x110]
push eax
call ebx
test eax, eax
jne 0x51a86f
push str.interface.txt
push str.LangPT_s
lea eax, [ebp - 0x110]
push 0x80
push eax
call fcn.004459c0
add esp, 0x10
lea eax, [ebp - 0x110]
push eax
push dword [edi + 0x1a87e4]
call fcn.0051a220
mov eax, dword [0x6345e4]
test eax, eax
jne 0x51a896
push str.command.txt
push str.LangPT_s
jmp 0x51a8a5
cmp eax, 1
jne 0x51a8b9
push str.command.txt
push str.LangEN_s
lea eax, [ebp - 0x110]
push 0x80
push eax
call fcn.004459c0
add esp, 0x10
lea eax, [ebp - 0x110]
push eax
call ebx
test eax, eax
jne 0x51a8e4
push str.command.txt
push str.LangPT_s
lea eax, [ebp - 0x110]
push 0x80
push eax
call fcn.004459c0
add esp, 0x10
lea eax, [ebp - 0x110]
push eax
push dword [edi + 0x1a87e8]
call fcn.0051a220
mov eax, dword [0x6345e4]
test eax, eax
jne 0x51a90b
push str.etc.txt
push str.LangPT_s
jmp 0x51a91a
cmp eax, 1
jne 0x51a92e
push str.etc.txt
push str.LangEN_s
lea eax, [ebp - 0x110]
push 0x80
push eax
call fcn.004459c0
add esp, 0x10
lea eax, [ebp - 0x110]
push eax
call ebx
test eax, eax
jne 0x51a959
push str.etc.txt
push str.LangPT_s
lea eax, [ebp - 0x110]
push 0x80
push eax
call fcn.004459c0
add esp, 0x10
lea eax, [ebp - 0x110]
push eax
push dword [edi + 0x1a87ec]
call fcn.0051a220
mov ecx, dword [edi + 0x1a87e8]
test ecx, ecx
je 0x51a97c
mov eax, dword [ecx]
push 0
call dword [eax + 0x60]
mov ecx, dword [edi + 0x1a87ec]
test ecx, ecx
je 0x51a98d
mov eax, dword [ecx]
push 0
call dword [eax + 0x60]
mov ecx, dword [edi + 0x1a87f0]
test ecx, ecx
je 0x51a99e
mov eax, dword [ecx]
push 0
call dword [eax + 0x60]
mov ecx, dword [edi + 0x1a8818]
test ecx, ecx
je 0x51a9af
mov eax, dword [ecx]
push 0
call dword [eax + 0x60]
mov ecx, dword [edi + 0x1a881c]
test ecx, ecx
je 0x51a9c0
mov eax, dword [ecx]
push 0
call dword [eax + 0x60]
mov ecx, dword [edi + 0x1a87d0]
push 0
mov eax, dword [ecx]
call dword [eax + 0x60]
mov esi, dword [edi + 0x1a87d0]
sub esp, 8
mov ecx, dword [0x9c25a4]
movss xmm2, dword [0x604d2c]
mov eax, dword [esi]
mov edx, dword [eax + 0x70]
mov eax, dword [ecx + 0xac]
movd xmm0, eax
cvtdq2pd xmm0, xmm0
shr eax, 0x1f
addsd xmm0, qword [eax*8 + 0x605750]
mov eax, dword [ecx + 0xa8]
mov ecx, esi
cvtpd2ps xmm1, xmm0
movss xmm0, dword [esi + 0x58]
mulss xmm0, dword [0x604d48]
mulss xmm1, xmm2
subss xmm1, xmm0
movd xmm0, eax
cvtdq2pd xmm0, xmm0
shr eax, 0x1f
movss dword [esp + 4], xmm1
addsd xmm0, qword [eax*8 + 0x605750]
cvtpd2ps xmm1, xmm0
movss xmm0, dword [esi + 0x54]
mulss xmm1, xmm2
mulss xmm0, xmm2
subss xmm1, xmm0
movss dword [esp], xmm1
call edx
mov ecx, dword [edi + 0x28]
push 0x17b3
mov eax, dword [ecx]
call dword [eax + 0x48]
mov dword [edi + 0x1a87f8], eax
xor ebx, ebx
lea eax, [edi + 0x1a87fc]
mov dword [ebp - 0x194], eax
nop dword [eax + eax]
mov ecx, dword [edi + 0x28]
lea esi, [ebx + 0x17ba]
mov eax, dword [ecx]
mov edx, dword [eax + 0x48]
lea eax, [esi - 0xa]
push eax
call edx
mov ecx, dword [ebp - 0x194]
push esi
mov dword [ecx], eax
mov ecx, dword [edi + 0x28]
mov eax, dword [ecx]
call dword [eax + 0x48]
mov esi, dword [ebp - 0x194]
mov dword [esi + 0xc], eax
test ebx, ebx
je 0x51aabb
mov ecx, dword [esi]
push 0
mov eax, dword [ecx]
call dword [eax + 0x60]
inc ebx
add esi, 4
mov dword [ebp - 0x194], esi
cmp ebx, 3
jl 0x51aa80
mov eax, dword [0x6345e4]
test eax, eax
jne 0x51aadf
push str.interface1.txt
push str.LangPT_s
jmp 0x51aaee
cmp eax, 1
jne 0x51ab02
push str.interface1.txt
push str.LangEN_s
lea eax, [ebp - 0x110]
push 0x80
push eax
call fcn.004459c0
add esp, 0x10
mov ebx, dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
lea eax, [ebp - 0x110]
push eax
call ebx
test eax, eax
jne 0x51ab33
push str.interface1.txt
push str.LangPT_s
lea eax, [ebp - 0x110]
push 0x80
push eax
call fcn.004459c0
add esp, 0x10
lea eax, [ebp - 0x110]
push eax
push dword [edi + 0x1a8808]
call fcn.0051a220
mov eax, dword [0x6345e4]
test eax, eax
jne 0x51ab5a
push str.interface2.txt
push str.LangPT_s
jmp 0x51ab69
cmp eax, 1
jne 0x51ab7d
push str.interface2.txt
push str.LangEN_s
lea eax, [ebp - 0x110]
push 0x80
push eax
call fcn.004459c0
add esp, 0x10
lea eax, [ebp - 0x110]
push eax
call ebx
test eax, eax
jne 0x51aba8
push str.interface2.txt
push str.LangPT_s
lea eax, [ebp - 0x110]
push 0x80
push eax
call fcn.004459c0
add esp, 0x10
lea eax, [ebp - 0x110]
push eax
push dword [edi + 0x1a880c]
call fcn.0051a220
mov eax, dword [0x6345e4]
test eax, eax
jne 0x51abcf
push str.interface3.txt
push str.LangPT_s
jmp 0x51abde
cmp eax, 1
jne 0x51abf2
push str.interface3.txt
push str.LangEN_s
lea eax, [ebp - 0x110]
push 0x80
push eax
call fcn.004459c0
add esp, 0x10
lea eax, [ebp - 0x110]
push eax
call ebx
test eax, eax
jne 0x51ac1d
push str.interface3.txt
push str.LangPT_s
lea eax, [ebp - 0x110]
push 0x80
push eax
call fcn.004459c0
add esp, 0x10
lea eax, [ebp - 0x110]
push eax
push dword [edi + 0x1a8810]
call fcn.0051a220
mov dword [edi + 0x1a87f4], 0
mov ecx, dword [edi + 0x28]
push 0x101630
mov eax, dword [ecx]
call dword [eax + 0x48]
mov dword [edi + 0x1a8820], eax
test eax, eax
je 0x51b5a1
mov ecx, dword [edi + 0x28]
push 0x101633
mov eax, dword [ecx]
call dword [eax + 0x48]
mov dword [edi + 0x1a8828], eax
mov ecx, dword [edi + 0x28]
push 0x101634
mov eax, dword [ecx]
call dword [eax + 0x48]
mov dword [edi + 0x1a8838], eax
mov ecx, dword [edi + 0x28]
push 0x101635
mov eax, dword [ecx]
call dword [eax + 0x48]
mov dword [edi + 0x1a8848], eax
mov ecx, dword [edi + 0x28]
push 0x101636
mov eax, dword [ecx]
call dword [eax + 0x48]
mov dword [edi + 0x1a882c], eax
mov ecx, dword [edi + 0x28]
push 0x101637
mov eax, dword [ecx]
call dword [eax + 0x48]
mov dword [edi + 0x1a883c], eax
mov ecx, dword [edi + 0x28]
push 0x101638
mov eax, dword [ecx]
call dword [eax + 0x48]
mov dword [edi + 0x1a884c], eax
mov ecx, dword [edi + 0x28]
push 0x101639
mov eax, dword [ecx]
call dword [eax + 0x48]
mov dword [edi + 0x1a8830], eax
mov ecx, dword [edi + 0x28]
push 0x10163a
mov eax, dword [ecx]
call dword [eax + 0x48]
mov dword [edi + 0x1a8840], eax
mov ecx, dword [edi + 0x28]
push 0x10163b
mov eax, dword [ecx]
call dword [eax + 0x48]
mov dword [edi + 0x1a8850], eax
mov ecx, dword [edi + 0x28]
push 0x10163c
mov eax, dword [ecx]
call dword [eax + 0x48]
mov dword [edi + 0x1a8834], eax
mov ecx, dword [edi + 0x28]
push 0x10163d
mov eax, dword [ecx]
call dword [eax + 0x48]
mov dword [edi + 0x1a8844], eax
mov ecx, dword [edi + 0x28]
push 0x10163f
mov eax, dword [ecx]
call dword [eax + 0x48]
mov ecx, dword [edi + 0x1a8838]
mov dword [edi + 0x1a8854], eax
test ecx, ecx
je 0x51ad49
mov eax, dword [ecx]
push 0
call dword [eax + 0x60]
mov ecx, dword [edi + 0x1a883c]
test ecx, ecx
je 0x51ad5a
mov eax, dword [ecx]
push 0
call dword [eax + 0x60]
mov ecx, dword [edi + 0x1a8840]
test ecx, ecx
je 0x51ad6b
mov eax, dword [ecx]
push 0
call dword [eax + 0x60]
mov ecx, dword [edi + 0x1a8844]
test ecx, ecx
je 0x51ad7c
mov eax, dword [ecx]
push 0
call dword [eax + 0x60]
mov ecx, dword [edi + 0x1a8848]
test ecx, ecx
je 0x51ad8d
mov eax, dword [ecx]
push 0
call dword [eax + 0x60]
mov ecx, dword [edi + 0x1a884c]
test ecx, ecx
je 0x51ad9e
mov eax, dword [ecx]
push 0
call dword [eax + 0x60]
mov ecx, dword [edi + 0x1a8850]
test ecx, ecx
je 0x51adaf
mov eax, dword [ecx]
push 0
call dword [eax + 0x60]
mov ecx, dword [edi + 0x1a8854]
test ecx, ecx
je 0x51adc0
mov eax, dword [ecx]
push 0
call dword [eax + 0x60]
mov ecx, dword [edi + 0x1a8820]
push 0
mov eax, dword [ecx]
call dword [eax + 0x60]
mov ecx, dword [edi + 0x1a8838]
mov eax, dword [ecx]
mov edx, dword [eax + 0x50]
mov eax, dword [edi + 0x28]
test eax, eax
je 0x51ade4
add eax, 0x24
jmp 0x51ade6
xor eax, eax
push eax
call edx
mov ecx, dword [edi + 0x1a883c]
mov eax, dword [ecx]
mov edx, dword [eax + 0x50]
mov eax, dword [edi + 0x28]
test eax, eax
je 0x51ae00
add eax, 0x24
jmp 0x51ae02
xor eax, eax
push eax
call edx
mov ecx, dword [edi + 0x1a8840]
mov eax, dword [ecx]
mov edx, dword [eax + 0x50]
mov eax, dword [edi + 0x28]
test eax, eax
je 0x51ae1c
add eax, 0x24
jmp 0x51ae1e
xor eax, eax
push eax
call edx
mov ecx, dword [edi + 0x1a8844]
mov eax, dword [ecx]
mov edx, dword [eax + 0x50]
mov eax, dword [edi + 0x28]
test eax, eax
je 0x51ae38
add eax, 0x24
jmp 0x51ae3a
xor eax, eax
push eax
call edx
mov esi, dword [edi + 0x1a8820]
sub esp, 8
mov ecx, dword [0x9c25a4]
movss xmm2, dword [0x604d2c]
mov eax, dword [esi]
mov edx, dword [eax + 0x70]
mov eax, dword [ecx + 0xac]
movd xmm0, eax
cvtdq2pd xmm0, xmm0
shr eax, 0x1f
addsd xmm0, qword [eax*8 + 0x605750]
mov eax, dword [ecx + 0xa8]
mov ecx, esi
cvtpd2ps xmm1, xmm0
movss xmm0, dword [esi + 0x58]
mulss xmm0, dword [0x604d48]
mulss xmm1, xmm2
subss xmm1, xmm0
movd xmm0, eax
cvtdq2pd xmm0, xmm0
shr eax, 0x1f
movss dword [esp + 4], xmm1
addsd xmm0, qword [eax*8 + 0x605750]
cvtpd2ps xmm1, xmm0
movss xmm0, dword [esi + 0x54]
mulss xmm1, xmm2
mulss xmm0, xmm2
subss xmm1, xmm0
movss dword [esp], xmm1
call edx
push 0x1f4
lea esi, [edi + 0x27980]
push 0
push esi
call fcn.00468b40
mov eax, dword [0x6345e4]
add esp, 0xc
test eax, eax
jne 0x51aef5
push str.QuestSubjects.txt
push str.LangPT_s
jmp 0x51af04
cmp eax, 1
jne 0x51af18
push str.QuestSubjects.txt
push str.LangEN_s
lea eax, [ebp - 0x110]
push 0x80
push eax
call fcn.004459c0
add esp, 0x10
lea eax, [ebp - 0x110]
push eax
call ebx
test eax, eax
jne 0x51af43
push str.QuestSubjects.txt
push str.LangPT_s
lea eax, [ebp - 0x110]
push 0x80
push eax
call fcn.004459c0
add esp, 0x10
push 0x61
lea eax, [ebp - 0x110]
push eax
push esi
call fcn.005926a0
mov eax, dword [0x6345e4]
test eax, eax
jne 0x51af67
push str.QuestSubjects2.txt
push str.LangPT_s
jmp 0x51af76
cmp eax, 1
jne 0x51af8a
push str.QuestSubjects2.txt
push str.LangEN_s
lea eax, [ebp - 0x110]
push 0x80
push eax
call fcn.004459c0
add esp, 0x10
lea eax, [ebp - 0x110]
push eax
call ebx
test eax, eax
jne 0x51afb5
push str.QuestSubjects2.txt
push str.LangPT_s
lea eax, [ebp - 0x110]
push 0x80
push eax
call fcn.004459c0
add esp, 0x10
push 0x62
lea eax, [ebp - 0x110]
push eax
lea eax, [edi + 0x27980]
push eax
call fcn.005926a0
mov eax, dword [0x6345e4]
test eax, eax
jne 0x51afdf
push str.QuestSubjects3.txt
push str.LangPT_s
jmp 0x51afee
cmp eax, 1
jne 0x51b002
push str.QuestSubjects3.txt
push str.LangEN_s
lea eax, [ebp - 0x110]
push 0x80
push eax
call fcn.004459c0
add esp, 0x10
lea eax, [ebp - 0x110]
push eax
call ebx
test eax, eax
jne 0x51b02d
push str.QuestSubjects3.txt
push str.LangPT_s
lea eax, [ebp - 0x110]
push 0x80
push eax
call fcn.004459c0
add esp, 0x10
push 0x63
lea eax, [ebp - 0x110]
push eax
lea eax, [edi + 0x27980]
push eax
call fcn.005926a0
mov eax, dword [0x6345e4]
test eax, eax
jne 0x51b057
push str.QuestSubjects4.txt
push str.LangPT_s
jmp 0x51b066
cmp eax, 1
jne 0x51b07a
push str.QuestSubjects4.txt
push str.LangEN_s
lea eax, [ebp - 0x110]
push 0x80
push eax
call fcn.004459c0
add esp, 0x10
lea eax, [ebp - 0x110]
push eax
call ebx
test eax, eax
jne 0x51b0a5
push str.QuestSubjects4.txt
push str.LangPT_s
lea eax, [ebp - 0x110]
push 0x80
push eax
call fcn.004459c0
add esp, 0x10
push 0x65
lea eax, [ebp - 0x110]
push eax
lea eax, [edi + 0x27980]
push eax
call fcn.005926a0
mov eax, dword [0x6345e4]
test eax, eax
jne 0x51b0cf
push str.QuestMessage.txt
push str.LangPT_s
jmp 0x51b0de
cmp eax, 1
jne 0x51b0f2
push str.QuestMessage.txt
push str.LangEN_s
lea eax, [ebp - 0x110]
push 0x80
push eax
call fcn.004459c0
add esp, 0x10
lea eax, [ebp - 0x110]
push eax
call ebx
test eax, eax
jne 0x51b11d
push str.QuestMessage.txt
push str.LangPT_s
lea eax, [ebp - 0x110]
push 0x80
push eax
call fcn.004459c0
add esp, 0x10
push 0x64
lea eax, [ebp - 0x110]
push eax
lea eax, [edi + 0x27980]
push eax
call fcn.005926a0
mov ecx, dword [edi + 0x28]
push 0x101641
mov eax, dword [ecx]
call dword [eax + 0x48]
mov dword [edi + 0x1a8858], eax
sub esp, 8
mov byte [eax + 0x1ec], 1
mov eax, dword [edi + 0x1a8858]
mov dword [esp + 4], 0xc1200000
mov dword [esp], 0xc1a00000
mov byte [eax + 0x1ed], 1
mov eax, dword [edi + 0x1a8858]
mov ecx, dword [eax + 0x1f0]
mov eax, dword [ecx]
call dword [eax + 0x70]
movss xmm0, dword [0x626b18]
mov eax, dword [edi + 0x27d70]
mulss xmm0, dword [0x60528c]
mov esi, dword [0x9c25ac]
addss xmm0, dword [eax + 0x4c]
mov eax, dword [edi + 0x1a8858]
movss dword [eax + 0x4c], xmm0
mov eax, dword [edi + 0x27d70]
movss xmm0, dword [0x626b1c]
mulss xmm0, dword [0x6051a0]
movss xmm1, dword [eax + 0x50]
mov eax, dword [edi + 0x1a8858]
subss xmm1, xmm0
movss dword [eax + 0x50], xmm1
cmp word [esi + 0x92c], 0
jne 0x51b590
mov eax, dword [0x6345e4]
test eax, eax
jne 0x51b1f5
push str.QuestSubjects.txt
push str.LangPT_s
jmp 0x51b204
cmp eax, 1
jne 0x51b218
push str.QuestSubjects.txt
push str.LangEN_s
lea eax, [ebp - 0x110]
push 0x80
push eax
call fcn.004459c0
add esp, 0x10
lea eax, [ebp - 0x110]
push eax
call ebx
test eax, eax
jne 0x51b243
push str.QuestSubjects.txt
push str.LangPT_s
lea eax, [ebp - 0x110]
push 0x80
push eax
call fcn.004459c0
add esp, 0x10
mov ecx, dword [0x9c25ac]
mov dword [ebp - 0x194], 0xa
movsx eax, word [ecx + 0x95c]
cdq
idiv dword [ebp - 0x194]
movsx eax, word [ecx + 0x92c]
push edx
inc eax
push eax
lea eax, [ebp - 0x110]
push eax
push dword [edi + 0x1a8838]
call fcn.005920f0
mov eax, dword [0x6345e4]
test eax, eax
jne 0x51b292
push str.QuestSubjects2.txt
push str.LangPT_s
jmp 0x51b2a1
cmp eax, 1
jne 0x51b2b5
push str.QuestSubjects2.txt
push str.LangEN_s
lea eax, [ebp - 0x110]
push 0x80
push eax
call fcn.004459c0
add esp, 0x10
lea eax, [ebp - 0x110]
push eax
call ebx
test eax, eax
jne 0x51b2e0
push str.QuestSubjects2.txt
push str.LangPT_s
lea eax, [ebp - 0x110]
push 0x80
push eax
call fcn.004459c0
add esp, 0x10
movsx eax, word [esi + 0x95c]
cdq
idiv dword [ebp - 0x194]
movsx eax, word [esi + 0x92c]
push edx
inc eax
push eax
lea eax, [ebp - 0x110]
push eax
push dword [edi + 0x1a883c]
call fcn.005920f0
mov eax, dword [0x6345e4]
test eax, eax
jne 0x51b31f
push str.QuestSubjects3.txt
push str.LangPT_s
jmp 0x51b32e
cmp eax, 1
jne 0x51b342
push str.QuestSubjects3.txt
push str.LangEN_s
lea eax, [ebp - 0x110]
push 0x80
push eax
call fcn.004459c0
add esp, 0x10
lea eax, [ebp - 0x110]
push eax
call ebx
test eax, eax
jne 0x51b36d
push str.QuestSubjects3.txt
push str.LangPT_s
lea eax, [ebp - 0x110]
push 0x80
push eax
call fcn.004459c0
add esp, 0x10
movsx eax, word [esi + 0x95c]
cdq
idiv dword [ebp - 0x194]
movsx eax, word [esi + 0x92c]
push edx
inc eax
push eax
lea eax, [ebp - 0x110]
push eax
push dword [edi + 0x1a8840]
call fcn.005920f0
mov eax, dword [0x6345e4]
test eax, eax
jne 0x51b3ac
push str.QuestSubjects4.txt
push str.LangPT_s
jmp 0x51b3bb
cmp eax, 1
jne 0x51b3cf
push str.QuestSubjects4.txt
push str.LangEN_s
lea eax, [ebp - 0x110]
push 0x80
push eax
call fcn.004459c0
add esp, 0x10
lea eax, [ebp - 0x110]
push eax
call ebx
test eax, eax
jne 0x51b3fa
push str.QuestSubjects4.txt
push str.LangPT_s
lea eax, [ebp - 0x110]
push 0x80
push eax
call fcn.004459c0
add esp, 0x10
movsx eax, word [esi + 0x95c]
cdq
idiv dword [ebp - 0x194]
movsx eax, word [esi + 0x92c]
push edx
inc eax
push eax
lea eax, [ebp - 0x110]
push eax
push dword [edi + 0x1a8844]
call fcn.005920f0
mov ecx, dword [edi + 0x1a8858]
push 0
mov eax, dword [ecx]
call dword [eax + 0x60]
push 0x80
lea eax, [ebp - 0x190]
push 0
push eax
call fcn.00468b40
movsx eax, word [esi + 0x92c]
add esp, 0xc
mov dword [ebp - 0x198], 0xffaaaaff
cmp byte [eax + edi + 0x27980], 0x64
jne 0x51b4fd
mov eax, dword [0x6345e4]
test eax, eax
jne 0x51b47b
push str.QuestMessage.txt
push str.LangPT_s
jmp 0x51b48a
cmp eax, 1
jne 0x51b49e
push str.QuestMessage.txt
push str.LangEN_s
lea eax, [ebp - 0x110]
push 0x80
push eax
call fcn.004459c0
add esp, 0x10
lea eax, [ebp - 0x110]
push eax
call ebx
test eax, eax
jne 0x51b4c9
push str.QuestMessage.txt
push str.LangPT_s
lea eax, [ebp - 0x110]
push 0x80
push eax
call fcn.004459c0
add esp, 0x10
movsx eax, word [esi + 0x95c]
cdq
idiv dword [ebp - 0x194]
movsx eax, word [esi + 0x92c]
push edx
inc eax
push eax
lea eax, [ebp - 0x110]
push eax
push ecx
lea eax, [ebp - 0x190]
push eax
call fcn.005927d0
mov dword [ebp - 0x198], eax
jmp 0x51b511
lea eax, [ebp - 0x190]
push 0x7e3130
push eax
call fcn.00445aa0
add esp, 8
push 0xe6c
call fcn.0046677d
mov esi, eax
mov dword [ebp - 0x194], esi
mov dword [ebp - 4], 3
push 0xe6c
push 0
push esi
call fcn.00468b40
add esp, 0x10
lea eax, [ebp - 0x190]
xorps xmm3, xmm3
push 0
push ecx
push 0x77777777
sub esp, 0x10
mov ecx, esi
mov dword [esp + 8], 0x41800000
mov dword [esp + 4], 0x43960000
mov dword [esp], 0
push dword [ebp - 0x198]
push eax
call fcn.004c9d30
mov dword [ebp - 4], 0xffffffff
test eax, eax
je 0x51b5a1
mov ecx, dword [edi + 0x27df4]
test ecx, ecx
je 0x51b5a1
push eax
call fcn.004c82d0
jmp 0x51b5a1
mov ecx, dword [edi + 0x1a8858]
test ecx, ecx
je 0x51b5a1
mov eax, dword [ecx]
push 0
call dword [eax + 0x60]
mov ecx, dword [edi + 0x28]
push 0x3100
mov eax, dword [ecx]
call dword [eax + 0x48]
mov ecx, dword [edi + 0x28]
mov dword [edi + 0x1aa130], eax
push 0x3101
mov eax, dword [ecx]
call dword [eax + 0x48]
mov ecx, dword [edi + 0x28]
mov dword [edi + 0x1aa134], eax
push 0x3105
mov eax, dword [ecx]
call dword [eax + 0x48]
mov ecx, dword [edi + 0x28]
mov dword [edi + 0x1aa138], eax
push 0x3106
mov eax, dword [ecx]
call dword [eax + 0x48]
mov ecx, dword [edi + 0x28]
mov dword [edi + 0x1aa13c], eax
push 0x3107
mov eax, dword [ecx]
call dword [eax + 0x48]
mov ecx, dword [edi + 0x28]
mov dword [edi + 0x1aa140], eax
push 0x3108
mov eax, dword [ecx]
call dword [eax + 0x48]
mov ecx, dword [0x9c25a4]
sub esp, 8
mov esi, dword [edi + 0x1aa130]
movss xmm2, dword [0x604d2c]
mov dword [edi + 0x1aa144], eax
mov eax, dword [ecx + 0xac]
mov edx, dword [esi]
movd xmm0, eax
cvtdq2pd xmm0, xmm0
shr eax, 0x1f
addsd xmm0, qword [eax*8 + 0x605750]
mov eax, dword [ecx + 0xa8]
mov ecx, esi
cvtpd2ps xmm1, xmm0
movss xmm0, dword [esi + 0x58]
mulss xmm0, xmm2
mulss xmm1, xmm2
subss xmm1, xmm0
movd xmm0, eax
cvtdq2pd xmm0, xmm0
shr eax, 0x1f
movss dword [esp + 4], xmm1
addsd xmm0, qword [eax*8 + 0x605750]
cvtpd2ps xmm1, xmm0
movss xmm0, dword [esi + 0x54]
mulss xmm1, xmm2
mulss xmm0, xmm2
subss xmm1, xmm0
movss dword [esp], xmm1
call dword [edx + 0x70]
mov ecx, dword [edi + 0x1aa134]
test ecx, ecx
je 0x51b6ba
mov eax, dword [ecx]
mov edx, dword [eax + 0x50]
mov eax, dword [edi + 0x28]
test eax, eax
je 0x51b6b5
add eax, 0x24
jmp 0x51b6b7
xor eax, eax
push eax
call edx
mov ecx, dword [edi + 0x1aa130]
test ecx, ecx
je 0x51b6cb
mov eax, dword [ecx]
push 0
call dword [eax + 0x60]
add edi, 0x1a8848
mov esi, 4
mov ecx, dword [edi - 0x10]
sub esp, 8
mov eax, dword [ecx]
movss xmm0, dword [ecx + 0x58]
movss dword [esp + 4], xmm0
mov dword [esp], 0x43480000
call dword [eax + 0x74]
mov ecx, dword [edi]
sub esp, 8
mov eax, dword [ecx]
movss xmm0, dword [ecx + 0x58]
movss dword [esp + 4], xmm0
mov dword [esp], 0x43960000
call dword [eax + 0x74]
lea edi, [edi + 4]
sub esi, 1
jne 0x51b6d6
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0046676f
mov esp, ebp
pop ebp
ret