Function at 0x4582b0
Capabilities:
Get common file path

Disassembly:
push 0xffffffffffffffff
push 0x4cb8f1
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xa94
push ebx
mov al, byte [esp + 7]
push ebp
push esi
push edi
xor ebp, ebp
sub esp, 0x10
mov dword [esp + 0x50], ecx
mov dword [esp + 0x24], ebp
mov esi, esp
mov dword [esp + 0x24], esp
push ebp
mov ecx, esi
mov byte [esi], al
call fcn.00401600
or ebx, 0xffffffff
mov edi, str.b.txt
mov ecx, ebx
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push str.b.txt
mov ecx, esi
call fcn.00401560
sub esp, 0x10
lea edx, [esp + 0x33]
mov ecx, esp
mov dword [esp + 0x3c], esp
push edx
push str.Patch
mov dword [esp + 0xad4], ebp
call fcn.00414370
sub esp, 0x10
lea eax, [esp + 0x42]
mov ecx, esp
mov dword [esp + 0x74], esp
push eax
push 0x5c89a0
mov byte [esp + 0xae4], 1
call fcn.00414370
lea ecx, [esp + 0x114]
mov dword [esp + 0xadc], ebx
call fcn.00457a60
lea ecx, [esp + 0xe4]
mov dword [esp + 0xaac], 2
call fcn.00457de0
test eax, eax
je 0x45889d
lea ecx, [esp + 0x19c]
push ecx
push 0x104
call dword [sym.imp.KERNEL32.DLL_GetCurrentDirectoryA]
mov dl, byte [esp + 0x12]
push ebp
lea ecx, [esp + 0x24]
mov byte [esp + 0x24], dl
call fcn.00401600
lea edi, [esp + 0x19c]
mov ecx, ebx
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea eax, [esp + 0x19c]
push ecx
push eax
lea ecx, [esp + 0x28]
call fcn.00401560
mov edi, str.Image_
mov ecx, ebx
xor eax, eax
mov byte [esp + 0xaac], 3
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push str.Image_
lea ecx, [esp + 0x28]
call fcn.0042d220
mov edx, dword [esp + 0x10c]
cmp edx, ebp
jne 0x4583fb
mov edx, 0x4cf414
mov edi, edx
mov ecx, ebx
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push edx
lea ecx, [esp + 0x28]
call fcn.0042d220
mov esi, dword [esp + 0x24]
cmp esi, ebp
jne 0x45841e
mov esi, 0x4cf414
lea ecx, [esp + 0xb0]
mov dword [esp + 0x54], 0x4d0be8
call fcn.0045a3e0
mov dword [esp + 0xb0], vtable.std::basic_ios_char__struct_std::char_traits_char__.0
mov dword [esp + 0x14], 1
push ebp
lea ecx, [esp + 0x60]
push ebp
push ecx
lea ecx, [esp + 0x60]
mov byte [esp + 0xab8], 4
call fcn.00458af0
push ebp
lea ecx, [esp + 0x60]
mov dword [esp + 0xab0], 5
call fcn.0045a020
mov edx, dword [esp + 0x54]
push 1
push esi
lea ecx, [esp + 0x64]
mov eax, dword [edx + 4]
mov byte [esp + 0xab4], 6
mov dword [esp + eax + 0x5c], 0x4d0be4
call fcn.0045a280
test eax, eax
jne 0x4584ac
mov ecx, dword [esp + 0x54]
push ebp
push 2
mov edx, dword [ecx + 4]
lea ecx, [esp + edx + 0x5c]
call fcn.00458ac0
mov al, byte [0x5c88b8]
mov ecx, 0x100
mov byte [esp + 0x6a0], al
xor eax, eax
lea edi, [esp + 0x6a1]
push ebp
rep stosd dword es:[edi], eax
mov cl, byte [esp + 0x16]
mov byte [esp + 0xab0], 7
mov byte [esp + 0x34], cl
lea ecx, [esp + 0x34]
call fcn.00401600
mov edx, dword [esp + 0x54]
mov byte [esp + 0xaac], 8
mov eax, dword [edx + 4]
mov eax, dword [esp + eax + 0x58]
test al, 1
jne 0x458555
test al, 6
jne 0x458555
mov ecx, 0x100
xor eax, eax
lea edi, [esp + 0x6a0]
push 0x400
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x6a4]
push ecx
lea ecx, [esp + 0x5c]
stosb byte es:[edi], al
call fcn.00458bb0
lea edi, [esp + 0x6a0]
mov ecx, ebx
xor eax, eax
lea edx, [esp + 0x6a0]
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push edx
lea ecx, [esp + 0x38]
call fcn.0042d220
mov eax, dword [esp + 0x54]
mov ecx, dword [eax + 4]
mov eax, dword [esp + ecx + 0x58]
test al, 1
je 0x4584f9
mov edx, dword [esp + 0x40]
mov eax, dword [edx + 0x10]
lea ebx, [edx + 0xc]
cmp eax, ebp
je 0x45857f
mov ecx, dword [ebx + 8]
sub ecx, eax
mov eax, 0x3e0f83e1
imul ecx
sar edx, 5
mov eax, edx
shr eax, 0x1f
add edx, eax
jne 0x4587d5
cmp dword [esp + 0x38], ebp
je 0x4587d5
mov eax, dword [esp + 0x34]
mov cx, word [0x4de420]
cmp eax, ebp
mov dword [esp + 0x48], str.__Lightboard
mov dword [esp + 0x4c], str.__StateRoom
mov dword [esp + 0x50], str.__StateWaiting
mov word [esp + 0x1a], cx
mov dword [esp + 0x1c], ebp
jne 0x4585be
mov eax, 0x4cf414
lea edx, [esp + 0x1a]
push edx
push eax
call fcn.004b7dbe
mov esi, eax
add esp, 8
cmp esi, ebp
je 0x4586f1
mov ebp, dword [sym.imp.KERNEL32.DLL_MultiByteToWideChar]
lea eax, [esp + 0x48]
mov dword [esp + 0x14], eax
cmp dword [esp + 0x1c], 3
jge 0x45868f
mov ecx, 0x80
xor eax, eax
lea edi, [esp + 0x2a0]
push 0x100
rep stosd dword es:[edi], eax
mov ecx, 0x80
lea edi, [esp + 0x4a4]
rep stosd dword es:[edi], eax
mov ecx, dword [esp + 0x18]
lea eax, [esp + 0x2a4]
push eax
xor eax, eax
mov edx, dword [ecx]
or ecx, 0xffffffff
mov edi, edx
repne scasb al, byte es:[edi]
not ecx
push ecx
push edx
push eax
push eax
call ebp
lea ecx, [esp + 0x4a0]
push 0x100
push ecx
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
push ecx
push esi
push eax
push eax
call ebp
lea edx, [esp + 0x2a0]
push edx
call fcn.004b9444
mov edi, eax
lea eax, [esp + 0x4a4]
push eax
call fcn.004b9444
push edi
push eax
call fcn.004b7e70
add esp, 0x10
test eax, eax
je 0x45868f
mov ecx, dword [esp + 0x1c]
mov eax, dword [esp + 0x14]
inc ecx
add eax, 4
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x14], eax
jmp 0x4586d6
mov ecx, dword [esp + 0x1c]
mov edi, esi
dec ecx
xor eax, eax
mov dword [esp + 0x118], ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x11c]
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov eax, dword [ebx + 8]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x118]
push ecx
push 1
push eax
mov ecx, ebx
call fcn.0045a450
lea edx, [esp + 0x1a]
push edx
push 0
call fcn.004b7dbe
mov esi, eax
add esp, 8
test esi, esi
jne 0x4585e4
xor ebp, ebp
mov eax, dword [esp + 0x40]
mov dword [eax + 8], 1
mov eax, dword [esp + 0x34]
cmp eax, ebp
je 0x458721
lea ecx, [eax - 1]
mov al, byte [eax - 1]
test al, al
je 0x458718
cmp al, 0xff
je 0x458718
dec al
mov byte [ecx], al
jmp 0x458721
push ecx
call fcn.004a9db0
add esp, 4
mov edx, dword [esp + 0x54]
mov dword [esp + 0x34], ebp
mov dword [esp + 0x38], ebp
mov dword [esp + 0x3c], ebp
mov eax, dword [edx + 4]
lea ecx, [esp + 0xb0]
mov dword [esp + 0x44], ecx
mov dword [esp + eax + 0x54], 0x4d0be4
lea ecx, [esp + 0x5c]
mov byte [esp + 0xaac], 0xa
call fcn.00458ff0
mov ecx, dword [esp + 0x54]
mov byte [esp + 0xaac], 3
mov edx, dword [ecx + 4]
lea ecx, [esp + 0xb0]
mov dword [esp + edx + 0x54], vtable.std::basic_istream_char__struct_std::char_traits_char__.0
mov dword [esp + 0xb0], vtable.std::basic_ios_char__struct_std::char_traits_char__.0
call fcn.004aa25f
mov eax, dword [esp + 0x24]
cmp eax, ebp
je 0x4587ab
lea ecx, [eax - 1]
mov al, byte [eax - 1]
test al, al
je 0x4587a2
cmp al, 0xff
je 0x4587a2
dec al
mov byte [ecx], al
jmp 0x4587ab
push ecx
call fcn.004a9db0
add esp, 4
lea ecx, [esp + 0xe4]
mov dword [esp + 0x24], ebp
mov dword [esp + 0x28], ebp
mov dword [esp + 0x2c], ebp
mov dword [esp + 0xaac], 0xffffffff
call fcn.00457bc0
xor eax, eax
jmp 0x4588b5
mov eax, dword [esp + 0x34]
cmp eax, ebp
je 0x4587fa
lea ecx, [eax - 1]
mov al, byte [eax - 1]
test al, al
je 0x4587f1
cmp al, 0xff
je 0x4587f1
dec al
mov byte [ecx], al
jmp 0x4587fa
push ecx
call fcn.004a9db0
add esp, 4
mov ecx, dword [esp + 0x54]
mov dword [esp + 0x34], ebp
mov dword [esp + 0x38], ebp
mov dword [esp + 0x3c], ebp
mov edx, dword [ecx + 4]
lea eax, [esp + 0xb0]
mov dword [esp + 0x44], eax
mov dword [esp + edx + 0x54], 0x4d0be4
lea ecx, [esp + 0x5c]
mov byte [esp + 0xaac], 9
call fcn.00458ff0
mov eax, dword [esp + 0x54]
mov byte [esp + 0xaac], 3
mov ecx, dword [eax + 4]
mov dword [esp + ecx + 0x54], vtable.std::basic_istream_char__struct_std::char_traits_char__.0
lea ecx, [esp + 0xb0]
mov dword [esp + 0xb0], vtable.std::basic_ios_char__struct_std::char_traits_char__.0
call fcn.004aa25f
mov eax, dword [esp + 0x24]
cmp eax, ebp
je 0x458884
lea ecx, [eax - 1]
mov al, byte [eax - 1]
test al, al
je 0x45887b
cmp al, 0xff
je 0x45887b
dec al
mov byte [ecx], al
jmp 0x458884
push ecx
call fcn.004a9db0
add esp, 4
mov dword [esp + 0x24], ebp
mov dword [esp + 0x28], ebp
mov dword [esp + 0x2c], ebp
mov dword [esp + 0xaac], 0xffffffff
jmp 0x4588a4
mov dword [esp + 0xaac], ebx
lea ecx, [esp + 0xe4]
call fcn.00457bc0
mov eax, 1
mov ecx, dword [esp + 0xaa4]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
pop ebx
add esp, 0xaa0
ret