Function at 0x5b3b50
Capabilities:
Get common file path
Set current directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x49c
call fcn.0049d550
push 0
call fcn.005f7600
add esp, 4
call fcn.005f7650
lea eax, [ebp - 0x190]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
mov ecx, dword [0x119f1d0]
and ecx, 0x80
je 0x5b3c45
push 2
lea edx, [ebp - 0xc]
push edx
mov eax, dword [0x280229c]
push eax
call fcn.00401560
add esp, 0xc
movzx ecx, word [ebp - 0xc]
cmp ecx, 1
jne 0x5b3c45
push 2
lea edx, [ebp - 0xc]
push edx
mov eax, dword [0x280229c]
push eax
call fcn.00401560
add esp, 0xc
movzx ecx, word [ebp - 0xc]
push ecx
lea edx, [ebp - 0x49c]
push edx
mov eax, dword [0x280229c]
push eax
call fcn.00401560
add esp, 0xc
lea ecx, [ebp - 0x190]
push ecx
push 0x254d958
call fcn.006b6b40
add esp, 8
push 0x254d958
call fcn.006b6c40
add esp, 4
movsx edx, byte [eax + 0x254d957]
cmp edx, 0x5c
je 0x5b3c1f
push 0x71faf8
push 0x254d958
call fcn.006b6b50
add esp, 8
lea eax, [ebp - 0x49c]
push eax
push 0x254d958
call fcn.006b6b50
add esp, 8
push 0x254d958
call fcn.005b38e0
add esp, 4
jmp 0x5b4276
mov ecx, 1
imul edx, ecx, 0
movsx eax, byte [edx + 0x27a41d8]
test eax, eax
je 0x5b3d76
push 0x27a41d8
push 0x254d958
call fcn.006b6b40
add esp, 8
mov ecx, dword [0x119f1d0]
and ecx, 0x40
je 0x5b3d4f
mov edx, 1
mov word [ebp - 4], dx
push 2
lea eax, [ebp - 4]
push eax
mov ecx, dword [0x280229c]
push ecx
call fcn.004016d0
add esp, 0xc
push 0x254d958
lea edx, [ebp - 0x294]
push edx
call fcn.006b6b40
add esp, 8
lea eax, [ebp - 0x294]
mov dword [ebp - 0x10], eax
lea ecx, [ebp - 0x190]
push ecx
call fcn.006b6c40
add esp, 4
push eax
lea edx, [ebp - 0x190]
push edx
lea eax, [ebp - 0x294]
push eax
call fcn.006e3a90
add esp, 0xc
test eax, eax
jne 0x5b3d0f
lea ecx, [ebp - 0x190]
push ecx
call fcn.006b6c40
add esp, 4
add eax, dword [ebp - 0x10]
mov dword [ebp - 0x10], eax
mov edx, dword [ebp - 0x10]
mov byte [edx], 0x5c
mov eax, 0x5c
test eax, eax
je 0x5b3d0f
mov ecx, dword [ebp - 0x10]
add ecx, 1
mov dword [ebp - 0x10], ecx
mov edx, dword [ebp - 0x10]
push edx
call fcn.006b6c40
add esp, 4
add eax, 1
mov word [ebp - 4], ax
push 2
lea eax, [ebp - 4]
push eax
mov ecx, dword [0x280229c]
push ecx
call fcn.004016d0
add esp, 0xc
movzx edx, word [ebp - 4]
push edx
mov eax, dword [ebp - 0x10]
push eax
mov ecx, dword [0x280229c]
push ecx
call fcn.004016d0
add esp, 0xc
push 0x27a41d8
call fcn.005b38e0
add esp, 4
mov dword [ebp - 0x80], eax
mov edx, 1
imul eax, edx, 0
mov byte [eax + 0x27a41d8], 0
mov eax, dword [ebp - 0x80]
jmp 0x5b4276
mov ecx, 0xe5d458
call fcn.0049b620
push 0x23
push str.Load_a__map__lighting__citsez__file_or_a_single_level_file
push str.Do_you_want_to_load_a_level_file_
mov ecx, dword [0xe5d454]
push ecx
call dword [sym.imp.USER32.dll_MessageBoxA]
mov dword [ebp - 0x84], eax
mov edx, dword [ebp - 0x84]
mov dword [ebp - 0x18], edx
cmp dword [ebp - 0x18], 2
je 0x5b4270
cmp dword [ebp - 0x18], 6
je 0x5b3dc7
cmp dword [ebp - 0x18], 7
je 0x5b3fe4
jmp 0x5b4274
mov eax, 1
imul ecx, eax, 0
mov byte [ecx + 0x254d958], 0
mov dword [ebp - 0x70], 0x58
mov edx, dword [0xe5d454]
mov dword [ebp - 0x6c], edx
mov dword [ebp - 0x68], 0
mov dword [ebp - 0x64], str.Level_files
mov dword [ebp - 0x60], 0
mov dword [ebp - 0x5c], 0
mov dword [ebp - 0x58], 0
mov dword [ebp - 0x54], 0x254d958
mov dword [ebp - 0x50], 0x104
mov dword [ebp - 0x4c], 0
mov dword [ebp - 0x48], 0
mov dword [ebp - 0x44], str.Levels
mov dword [ebp - 0x40], str.Load_a_level
mov dword [ebp - 0x3c], 0x1804
xor eax, eax
mov word [ebp - 0x38], ax
xor ecx, ecx
mov word [ebp - 0x36], cx
mov dword [ebp - 0x34], 0x7216a4
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x28], 0
lea edx, [ebp - 0x70]
push edx
call dword [sym.imp.COMDLG32.dll_GetOpenFileNameA]
test eax, eax
jne 0x5b3e77
xor eax, eax
jmp 0x5b4276
lea eax, [ebp - 0x190]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
mov ecx, dword [0x119f1d0]
and ecx, 0x40
je 0x5b3f65
mov edx, 1
mov word [ebp - 8], dx
push 2
lea eax, [ebp - 8]
push eax
mov ecx, dword [0x280229c]
push ecx
call fcn.004016d0
add esp, 0xc
push 0x254d958
lea edx, [ebp - 0x398]
push edx
call fcn.006b6b40
add esp, 8
lea eax, [ebp - 0x398]
mov dword [ebp - 0x14], eax
lea ecx, [ebp - 0x190]
push ecx
call fcn.006b6c40
add esp, 4
push eax
lea edx, [ebp - 0x190]
push edx
lea eax, [ebp - 0x398]
push eax
call fcn.006e3a90
add esp, 0xc
test eax, eax
jne 0x5b3f25
lea ecx, [ebp - 0x190]
push ecx
call fcn.006b6c40
add esp, 4
add eax, dword [ebp - 0x14]
mov dword [ebp - 0x14], eax
mov edx, dword [ebp - 0x14]
mov byte [edx], 0x5c
mov eax, 0x5c
test eax, eax
je 0x5b3f25
mov ecx, dword [ebp - 0x14]
add ecx, 1
mov dword [ebp - 0x14], ecx
mov edx, dword [ebp - 0x14]
push edx
call fcn.006b6c40
add esp, 4
add eax, 1
mov word [ebp - 8], ax
push 2
lea eax, [ebp - 8]
push eax
mov ecx, dword [0x280229c]
push ecx
call fcn.004016d0
add esp, 0xc
movzx edx, word [ebp - 8]
push edx
mov eax, dword [ebp - 0x14]
push eax
mov ecx, dword [0x280229c]
push ecx
call fcn.004016d0
add esp, 0xc
push 0x254d958
call fcn.006b6c40
add esp, 4
movsx edx, byte [eax + 0x254d955]
cmp edx, 0x77
jne 0x5b3f97
push 0x254d958
call fcn.005f1a80
add esp, 4
mov eax, 4
jmp 0x5b4276
push 0x254d958
call fcn.005b38e0
add esp, 4
test eax, eax
je 0x5b3fb4
mov eax, 5
jmp 0x5b4276
xor eax, eax
jmp 0x5b4276
mov eax, 1
imul ecx, eax, 0
mov byte [ecx + 0x254d640], 0
mov dword [ebp - 0x70], 0x58
mov edx, dword [0xe5d454]
mov dword [ebp - 0x6c], edx
mov dword [ebp - 0x68], 0
mov dword [ebp - 0x64], str.Game_map_files
mov dword [ebp - 0x60], 0
mov dword [ebp - 0x5c], 0
mov dword [ebp - 0x58], 0
mov dword [ebp - 0x54], 0x254d640
mov dword [ebp - 0x50], 0x104
mov dword [ebp - 0x4c], 0
mov dword [ebp - 0x48], 0
mov dword [ebp - 0x44], str.data
mov dword [ebp - 0x40], str.Load_a_game_map
mov dword [ebp - 0x3c], 0x1804
xor eax, eax
mov word [ebp - 0x38], ax
xor ecx, ecx
mov word [ebp - 0x36], cx
mov dword [ebp - 0x34], 0x7221b8
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x28], 0
lea edx, [ebp - 0x70]
push edx
call dword [sym.imp.COMDLG32.dll_GetOpenFileNameA]
test eax, eax
jne 0x5b4094
jmp 0x5b3b6d
mov dword [ebp - 0x8c], 0x254d640
push 0x7222d0
push 0x254d640
push 0x254d748
call fcn.005b0580
add esp, 0xc
lea eax, [ebp - 0x190]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
mov dword [ebp - 0x70], 0x58
mov ecx, dword [0xe5d454]
mov dword [ebp - 0x6c], ecx
mov dword [ebp - 0x68], 0
mov dword [ebp - 0x64], str.Lighting_files
mov dword [ebp - 0x60], 0
mov dword [ebp - 0x5c], 0
mov dword [ebp - 0x58], 0
mov dword [ebp - 0x54], 0x254d748
mov dword [ebp - 0x50], 0x104
mov dword [ebp - 0x4c], 0
mov dword [ebp - 0x48], 0
mov dword [ebp - 0x44], str.datalighting
mov dword [ebp - 0x40], str.Load_a_lighting_file
mov dword [ebp - 0x3c], 0x1804
xor edx, edx
mov word [ebp - 0x38], dx
xor eax, eax
mov word [ebp - 0x36], ax
mov dword [ebp - 0x34], 0x7222d0
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x28], 0
lea ecx, [ebp - 0x70]
push ecx
call dword [sym.imp.COMDLG32.dll_GetOpenFileNameA]
test eax, eax
jne 0x5b4165
mov dword [ebp - 0x7c], 0
jmp 0x5b416c
mov dword [ebp - 0x7c], 0x254d748
push 0x722330
push 0x254d640
push 0x254d850
call fcn.005b0580
add esp, 0xc
lea edx, [ebp - 0x190]
push edx
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
mov dword [ebp - 0x70], 0x58
mov eax, dword [0xe5d454]
mov dword [ebp - 0x6c], eax
mov dword [ebp - 0x68], 0
mov dword [ebp - 0x64], str.Text_files
mov dword [ebp - 0x60], 0
mov dword [ebp - 0x5c], 0
mov dword [ebp - 0x58], 0
mov dword [ebp - 0x54], 0x254d850
mov dword [ebp - 0x50], 0x104
mov dword [ebp - 0x4c], 0
mov dword [ebp - 0x48], 0
mov dword [ebp - 0x44], str._text
mov dword [ebp - 0x40], str.Load_a_Citizen_sez_text_file
mov dword [ebp - 0x3c], 0x1804
xor ecx, ecx
mov word [ebp - 0x38], cx
xor edx, edx
mov word [ebp - 0x36], dx
mov dword [ebp - 0x34], 0x722330
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x28], 0
lea eax, [ebp - 0x70]
push eax
call dword [sym.imp.COMDLG32.dll_GetOpenFileNameA]
test eax, eax
jne 0x5b4232
mov dword [ebp - 0x78], 0
jmp 0x5b4239
mov dword [ebp - 0x78], 0x254d850
mov dword [ebp - 0x88], 0
lea ecx, [ebp - 0x190]
push ecx
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
mov edx, dword [ebp - 0x88]
push edx
mov eax, dword [ebp - 0x78]
push eax
mov ecx, dword [ebp - 0x7c]
push ecx
mov edx, dword [ebp - 0x8c]
push edx
call fcn.005b0640
add esp, 0x10
jmp 0x5b4276
xor eax, eax
jmp 0x5b4276
xor eax, eax
mov esp, ebp
pop ebp
ret