Function at 0x5524e0
Capabilities:
Get common file path
Read file on windows
Set current directory
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x320
cmp dword [0x1b31768], 0
je 0x552523
push 0x23
push str.Urban_Chaos_Mission_Editor
push str.Changes_have_been_made_to_the_current_workspace._nDo_you_want_to_save_
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
mov dword [ebp - 0x3c], eax
cmp dword [ebp - 0x3c], 2
jne 0x552518
xor eax, eax
jmp 0x552dcd
cmp dword [ebp - 0x3c], 6
jne 0x552523
call fcn.00552fd0
call fcn.00551c70
mov eax, 1
imul ecx, eax, 0
mov byte [ecx + 0x1b31da8], 0
lea edx, [ebp - 0x21c]
push edx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
cmp dword [ebp + 8], 0
je 0x55258e
push 0x716764
push str.last_workspace.ini
call fcn.00690360
add esp, 8
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x28], 0
je 0x55258e
mov eax, dword [ebp - 0x28]
push eax
push 0x104
push 1
push 0x1b31da8
call fcn.006b7750
add esp, 0x10
mov ecx, dword [ebp - 0x28]
push ecx
call fcn.0068fac0
add esp, 4
mov edx, 1
imul eax, edx, 0
movsx ecx, byte [eax + 0x1b31da8]
test ecx, ecx
jne 0x552650
push 0x7223a0
push 0x1b31da8
call fcn.0041e320
add esp, 8
push 0x58
push 0
lea edx, [ebp - 0x118]
push edx
call fcn.0067d630
add esp, 0xc
mov dword [ebp - 0x118], 0x58
mov dword [ebp - 0x114], 0
mov dword [ebp - 0x10c], str.Editor_Workspace_Files
mov dword [ebp - 0xfc], 0x1b31da8
mov dword [ebp - 0xf8], 0x104
mov dword [ebp - 0xf4], 0x1b31ca0
mov dword [ebp - 0xf0], 0x104
mov dword [ebp - 0xec], 0x1b31b98
mov dword [ebp - 0xe8], str.Open_a_Workspace
mov dword [ebp - 0xe4], 0x804
mov dword [ebp - 0xdc], 0x7223e0
lea eax, [ebp - 0x118]
push eax
call dword [sym.imp.COMDLG32.dll_GetOpenFileNameA]
test eax, eax
jne 0x552650
xor eax, eax
jmp 0x552dcd
lea ecx, [ebp - 0x21c]
push ecx
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
push 0x716764
push 0x1b31da8
call fcn.00690360
add esp, 8
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
je 0x552dcb
push 0x717e54
push str.last_workspace.ini
call fcn.00690360
add esp, 8
mov dword [ebp - 0x2c], eax
cmp dword [ebp - 0x2c], 0
je 0x5526bb
mov edx, dword [ebp - 0x2c]
push edx
push 0x104
push 1
push 0x1b31da8
call fcn.006cf670
add esp, 0x10
mov eax, dword [ebp - 0x2c]
push eax
call fcn.0068fac0
add esp, 4
mov ecx, dword [ebp - 0x10]
push ecx
push 1
push 1
lea edx, [ebp - 9]
push edx
call fcn.006b7750
add esp, 0x10
mov eax, dword [ebp - 0x10]
push eax
push 1
push 4
lea ecx, [ebp - 0x30]
push ecx
call fcn.006b7750
add esp, 0x10
mov edx, dword [ebp - 0x10]
push edx
push 1
push 4
lea eax, [ebp - 0x34]
push eax
call fcn.006b7750
add esp, 0x10
mov dword [ebp - 4], 0
jmp 0x552709
mov ecx, dword [ebp - 4]
add ecx, 1
mov dword [ebp - 4], ecx
mov edx, dword [ebp - 4]
cmp edx, dword [ebp - 0x30]
jae 0x552827
mov eax, dword [ebp - 0x10]
push eax
push 1
mov ecx, dword [ebp - 0x34]
push ecx
imul edx, dword [ebp - 4], 0x1d0
add edx, 0x1b2df10
push edx
call fcn.006b7750
add esp, 0x10
imul eax, dword [ebp - 4], 0x1d0
cmp dword [eax + 0x1b2df10], 0
je 0x552822
push 0xc
call fcn.0067bdb0
add esp, 4
mov dword [ebp - 0x48], eax
mov ecx, dword [ebp - 0x48]
mov dword [ebp - 8], ecx
cmp dword [ebp - 8], 0
je 0x552822
mov edx, dword [0x1b31eb4]
mov dword [ebp - 0x98], edx
mov dword [ebp - 0x94], 0xffff0002
mov dword [ebp - 0x90], 0x27
mov dword [ebp - 0x78], 6
mov dword [ebp - 0x74], 6
imul eax, dword [ebp - 4], 0x1d0
mov ecx, 1
imul edx, ecx, 5
lea eax, [eax + edx + 0x1b2df14]
mov dword [ebp - 0x80], eax
mov ecx, dword [ebp - 8]
mov dword [ebp - 0x6c], ecx
lea edx, [ebp - 0x98]
push edx
push 0
push 0x1100
mov eax, dword [0x1b3176c]
push eax
call dword [sym.imp.USER32.dll_SendMessageA]
mov ecx, dword [ebp - 8]
mov dword [ecx + 8], eax
mov edx, dword [ebp - 8]
mov byte [edx], 2
mov eax, dword [ebp - 8]
mov cx, word [ebp - 4]
mov word [eax + 4], cx
push 0
push 0
push 0x1105
mov edx, dword [0x1b3176c]
push edx
call dword [sym.imp.USER32.dll_SendMessageA]
mov word [ebp - 0x24], ax
movzx eax, word [ebp - 0x24]
cmp eax, 2
jg 0x552822
mov ecx, dword [0x1b31eb4]
push ecx
push 2
push 0x1102
mov edx, dword [0x1b3176c]
push edx
call dword [sym.imp.USER32.dll_SendMessageA]
jmp 0x552700
mov eax, dword [ebp - 0x10]
push eax
push 1
push 4
lea ecx, [ebp - 0x30]
push ecx
call fcn.006b7750
add esp, 0x10
mov edx, dword [ebp - 0x10]
push edx
push 1
push 4
lea eax, [ebp - 0x40]
push eax
call fcn.006b7750
add esp, 0x10
mov ecx, dword [ebp - 0x10]
push ecx
push 1
push 4
lea edx, [ebp - 0x34]
push edx
call fcn.006b7750
add esp, 0x10
mov dword [ebp - 4], 0
jmp 0x552875
mov eax, dword [ebp - 4]
add eax, 1
mov dword [ebp - 4], eax
mov ecx, dword [ebp - 4]
cmp ecx, dword [ebp - 0x30]
jae 0x552d29
push 0x9a21
push 0
imul edx, dword [ebp - 4], 0x9a21
add edx, 0x15daa28
push edx
call fcn.0067d630
add esp, 0xc
mov eax, dword [ebp - 0x10]
push eax
push 1
mov ecx, dword [ebp - 0x34]
push ecx
imul edx, dword [ebp - 4], 0x9a21
add edx, 0x15daa28
push edx
call fcn.006b7750
add esp, 0x10
imul eax, dword [ebp - 4], 0x9a21
add eax, 0x15daa28
push eax
call fcn.00545e60
add esp, 4
imul ecx, dword [ebp - 4], 0x9a21
add ecx, 0x15daa28
push ecx
call fcn.00546050
add esp, 4
imul edx, dword [ebp - 4], 0x9a21
add edx, 0x15daa28
push edx
call fcn.00545ef0
add esp, 4
imul eax, dword [ebp - 4], 0x9a21
add eax, 0x15daa28
push eax
call fcn.005460e0
add esp, 4
imul ecx, dword [ebp - 4], 0x9a21
mov edx, dword [ecx + 0x15daa28]
and edx, 1
je 0x552cfc
movzx eax, byte [ebp - 9]
cmp eax, 4
jge 0x5529ce
mov dword [ebp - 0x14], 0
imul ecx, dword [ebp - 4], 0x9a21
add ecx, 0x15daf48
mov dword [ebp - 0x18], ecx
jmp 0x552962
mov edx, dword [ebp - 0x14]
add edx, 1
mov dword [ebp - 0x14], edx
mov eax, dword [ebp - 0x18]
add eax, 0x4a
mov dword [ebp - 0x18], eax
mov ecx, dword [ebp - 0x14]
cmp ecx, dword [ebp - 0x40]
jae 0x5529ce
mov edx, dword [ebp - 0x18]
movzx eax, byte [edx + 2]
cmp eax, 3
jne 0x5529cc
mov ecx, 4
imul edx, ecx, 0
mov eax, dword [ebp - 0x18]
mov ecx, dword [eax + edx + 0xe]
and ecx, 0xffff
movzx edx, cx
mov eax, 4
shl eax, 0
mov ecx, dword [ebp - 0x18]
mov eax, dword [ecx + eax + 0xe]
and eax, 0xffff
movzx ecx, ax
shl ecx, 0x10
or edx, ecx
mov eax, 4
imul ecx, eax, 0
mov eax, dword [ebp - 0x18]
mov dword [eax + ecx + 0xe], edx
mov ecx, 4
shl ecx, 0
mov edx, dword [ebp - 0x18]
mov dword [edx + ecx + 0xe], 0
jmp 0x552950
imul eax, dword [ebp - 4], 0x9a21
movzx ecx, byte [eax + 0x15e4446]
test ecx, ecx
jne 0x5529ee
imul edx, dword [ebp - 4], 0x9a21
mov byte [edx + 0x15e4446], 4
mov dword [ebp - 0x14], 0
jmp 0x552a00
mov eax, dword [ebp - 0x14]
add eax, 1
mov dword [ebp - 0x14], eax
mov ecx, dword [ebp - 0x14]
cmp ecx, dword [ebp - 0x40]
jae 0x552a3b
movzx edx, byte [ebp - 9]
push edx
imul eax, dword [ebp - 4], 0x9a21
add eax, 0x15daf48
push eax
imul ecx, dword [ebp - 4], 0x9a21
imul edx, dword [ebp - 0x14], 0x4a
lea eax, [ecx + edx + 0x15daf48]
push eax
mov ecx, dword [ebp - 0x10]
push ecx
call fcn.005489b0
add esp, 0x10
jmp 0x5529f7
mov dword [ebp - 0x38], 0
push 0
push 0
push 0x110a
mov edx, dword [0x1b3176c]
push edx
call dword [sym.imp.USER32.dll_SendMessageA]
push eax
push 4
push 0x110a
mov eax, dword [0x1b3176c]
push eax
call dword [sym.imp.USER32.dll_SendMessageA]
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
je 0x552aef
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0xbc], ecx
mov dword [ebp - 0xc0], 4
lea edx, [ebp - 0xc0]
push edx
push 0
push 0x110c
mov eax, dword [0x1b3176c]
push eax
call dword [sym.imp.USER32.dll_SendMessageA]
mov ecx, dword [ebp - 0x9c]
mov dword [ebp - 0x20], ecx
cmp dword [ebp - 0x20], 0
je 0x552ad2
imul edx, dword [ebp - 4], 0x9a21
movzx eax, word [edx + 0x15daf40]
mov ecx, dword [ebp - 0x20]
movzx edx, word [ecx + 4]
cmp eax, edx
jne 0x552ad2
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x38], eax
jmp 0x552aef
mov ecx, dword [ebp - 0x1c]
push ecx
push 1
push 0x110a
mov edx, dword [0x1b3176c]
push edx
call dword [sym.imp.USER32.dll_SendMessageA]
mov dword [ebp - 0x1c], eax
jmp 0x552a6f
cmp dword [ebp - 0x20], 0
je 0x552cfc
cmp dword [ebp - 0x38], 0
je 0x552cfc
push 0xc
call fcn.0067bdb0
add esp, 4
mov dword [ebp - 0x4c], eax
mov eax, dword [ebp - 0x4c]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
je 0x552baa
mov ecx, dword [ebp - 0x38]
mov dword [ebp - 0x98], ecx
mov dword [ebp - 0x94], 0xffff0002
mov dword [ebp - 0x90], 0x27
mov dword [ebp - 0x78], 1
mov dword [ebp - 0x74], 1
imul edx, dword [ebp - 4], 0x9a21
add edx, 0x15dad38
mov dword [ebp - 0x80], edx
mov eax, dword [ebp - 8]
mov dword [ebp - 0x6c], eax
lea ecx, [ebp - 0x98]
push ecx
push 0
push 0x1100
mov edx, dword [0x1b3176c]
push edx
call dword [sym.imp.USER32.dll_SendMessageA]
mov ecx, dword [ebp - 8]
mov dword [ecx + 8], eax
mov edx, dword [ebp - 8]
mov byte [edx], 3
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 0x20]
mov dx, word [ecx + 4]
mov word [eax + 4], dx
mov eax, dword [ebp - 8]
mov cx, word [ebp - 4]
mov word [eax + 6], cx
mov edx, dword [ebp - 8]
mov eax, dword [edx + 8]
mov dword [ebp - 0x44], eax
imul ecx, dword [ebp - 4], 0x9a21
mov edx, 1
imul eax, edx, 0
movsx ecx, byte [ecx + eax + 0x15dab30]
test ecx, ecx
je 0x552c53
push 0xc
call fcn.0067bdb0
add esp, 4
mov dword [ebp - 0x50], eax
mov edx, dword [ebp - 0x50]
mov dword [ebp - 8], edx
cmp dword [ebp - 8], 0
je 0x552c53
mov eax, dword [ebp - 0x44]
mov dword [ebp - 0x98], eax
mov dword [ebp - 0x94], 0xffff0002
mov dword [ebp - 0x90], 0x27
mov dword [ebp - 0x78], 7
mov dword [ebp - 0x74], 7
imul ecx, dword [ebp - 4], 0x9a21
mov edx, 1
imul eax, edx, 5
lea ecx, [ecx + eax + 0x15dab30]
mov dword [ebp - 0x80], ecx
mov edx, dword [ebp - 8]
mov dword [ebp - 0x6c], edx
lea eax, [ebp - 0x98]
push eax
push 0
push 0x1100
mov ecx, dword [0x1b3176c]
push ecx
call dword [sym.imp.USER32.dll_SendMessageA]
mov edx, dword [ebp - 8]
mov dword [edx + 8], eax
mov eax, dword [ebp - 8]
mov byte [eax], 4
imul ecx, dword [ebp - 4], 0x9a21
mov edx, 1
imul eax, edx, 0
movsx ecx, byte [ecx + eax + 0x15dae3c]
test ecx, ecx
je 0x552cfc
push 0xc
call fcn.0067bdb0
add esp, 4
mov dword [ebp - 0x54], eax
mov edx, dword [ebp - 0x54]
mov dword [ebp - 8], edx
cmp dword [ebp - 8], 0
je 0x552cfc
mov eax, dword [ebp - 0x44]
mov dword [ebp - 0x98], eax
mov dword [ebp - 0x94], 0xffff0002
mov dword [ebp - 0x90], 0x27
mov dword [ebp - 0x78], 5
mov dword [ebp - 0x74], 5
imul ecx, dword [ebp - 4], 0x9a21
mov edx, 1
imul eax, edx, 5
lea ecx, [ecx + eax + 0x15dae3c]
mov dword [ebp - 0x80], ecx
mov edx, dword [ebp - 8]
mov dword [ebp - 0x6c], edx
lea eax, [ebp - 0x98]
push eax
push 0
push 0x1100
mov ecx, dword [0x1b3176c]
push ecx
call dword [sym.imp.USER32.dll_SendMessageA]
mov edx, dword [ebp - 8]
mov dword [edx + 8], eax
mov eax, dword [ebp - 8]
mov byte [eax], 4
movzx ecx, byte [ebp - 9]
cmp ecx, 3
jl 0x552d24
mov edx, dword [ebp - 0x10]
push edx
push 1
push 0x4000
mov eax, dword [ebp - 4]
shl eax, 0xe
add eax, 0x199df10
push eax
call fcn.006b7750
add esp, 0x10
jmp 0x55286c
push 0
push 0
mov ecx, dword [0x1b3176c]
push ecx
call dword [sym.imp.USER32.dll_InvalidateRect]
push 0x1b31ca0
push str.Workspace_:__s
lea edx, [ebp - 0x320]
push edx
call fcn.0041e320
add esp, 0xc
mov dword [ebp - 0xc0], 0x23
mov eax, dword [0x1b31eb4]
mov dword [ebp - 0xbc], eax
lea ecx, [ebp - 0x320]
mov dword [ebp - 0xb0], ecx
mov dword [ebp - 0xa8], 0
mov dword [ebp - 0xa4], 0
mov byte [0x1b31eac], 1
lea edx, [ebp - 0xc0]
push edx
push 0
push 0x110d
mov eax, dword [0x1b3176c]
push eax
call dword [sym.imp.USER32.dll_SendMessageA]
mov dword [0x1b31768], 0
call fcn.0053f360
mov ecx, dword [ebp - 0x10]
push ecx
call fcn.0068fac0
add esp, 4
mov eax, 1
jmp 0x552dcd
xor eax, eax
mov esp, ebp
pop ebp
ret