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

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffc88
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x378], ebx
mov dword [ebp - 0x274], ebx
mov dword [ebp - 0x270], ebx
mov dword [ebp - 0x16c], ebx
mov dword [ebp - 8], ecx
mov esi, edx
mov dword [ebp - 4], eax
xor eax, eax
push ebp
push 0x42753b
push dword fs:[eax]
mov dword fs:[eax], esp
push 0x4be22c
push 0x80
call sub.kernel32.dll_GetCurrentDirectoryA
mov eax, 0x80
call fcn.00402688
mov edi, eax
xor eax, eax
mov al, byte [esi]
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jne 0x427230
xor eax, eax
mov dword [ebp - 0xc], eax
xor ebx, ebx
jmp 0x4272f3
mov eax, esi
mov edx, 0x42754c
xor ecx, ecx
mov cl, byte [eax]
inc ecx
call fcn.00403060
jne 0x427256
mov dword [ebp - 0xc], 1
xor eax, eax
mov dword [ebp - 0x10], eax
xor ebx, ebx
jmp 0x4272f3
mov ebx, dword [ebp - 0x10]
jmp 0x42725c
dec ebx
test ebx, ebx
jle 0x42726c
cmp byte [esi + ebx], 0x2e
je 0x42726c
cmp byte [esi + ebx], 0x5c
jne 0x42725b
test ebx, ebx
jle 0x4272ee
cmp byte [esi + ebx], 0x2e
jne 0x4272ee
cmp ebx, dword [ebp - 0x10]
jne 0x427282
xor eax, eax
mov dword [ebp - 0xc], eax
jmp 0x4272f3
lea eax, [ebp - 0x168]
push eax
mov ecx, dword [ebp - 0x10]
sub ecx, ebx
lea edx, [ebx + 1]
mov eax, esi
call fcn.00402798
cmp byte [ebp - 0x168], 3
jne 0x4272da
mov al, byte [ebp - 0x167]
cmp al, 0x52
je 0x4272af
cmp al, 0x72
jne 0x4272da
mov dl, byte [ebp - 0x166]
cmp dl, 0x50
je 0x4272bf
cmp dl, 0x70
jne 0x4272da
cmp byte [ebp - 0x165], 0x54
je 0x4272d1
cmp byte [ebp - 0x165], 0x74
jne 0x4272da
mov dword [ebp - 0xc], 1
jmp 0x4272e2
xor eax, eax
mov dword [ebp - 0xc], eax
jmp 0x4272e2
dec ebx
test ebx, ebx
jle 0x4272f3
cmp byte [esi + ebx], 0x5c
jne 0x4272e1
jmp 0x4272f3
xor eax, eax
mov dword [ebp - 0xc], eax
mov eax, dword [0x47c664]
mov dword [ebp - 0x60], eax
lea eax, [ebp - 0x68]
xor ecx, ecx
mov edx, 0x58
call fcn.004031f8
mov dword [ebp - 0x68], 0x58
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0xc]
mov dword [ebp - 0x64], eax
mov eax, dword [0x47b584]
inc eax
mov dword [ebp - 0x5c], eax
mov eax, dword [ebp - 0xc]
inc eax
mov dword [ebp - 0x50], eax
cmp dword [ebp - 0x10], 0
jne 0x427335
mov byte [edi], 0
jmp 0x427369
lea eax, [ebp - 0x26c]
push eax
mov ecx, dword [ebp - 0x10]
sub ecx, ebx
lea edx, [ebx + 1]
mov eax, esi
call fcn.00402798
lea edx, [ebp - 0x26c]
lea eax, [ebp - 0x16c]
call fcn.00404e58
mov edx, dword [ebp - 0x16c]
mov eax, edi
call fcn.00409294
mov dword [ebp - 0x4c], edi
mov dword [ebp - 0x48], 0x80
cmp dword [ebp - 0xc], 0
jne 0x4273e9
test ebx, ebx
jne 0x427397
cmp byte [0x4be12c], 0
jne 0x4273ce
push 0x4be12c
push 0x80
call sub.kernel32.dll_GetCurrentDirectoryA
jmp 0x4273ce
lea eax, [ebp - 0x26c]
push eax
mov ecx, ebx
dec ecx
mov eax, esi
mov edx, 1
call fcn.00402798
lea edx, [ebp - 0x26c]
lea eax, [ebp - 0x270]
call fcn.00404e58
mov edx, dword [ebp - 0x270]
mov eax, 0x4be12c
call fcn.00409294
mov dword [ebp - 0x3c], 0x4be12c
mov eax, dword [0x47b16c]
mov eax, dword [eax]
mov dword [ebp - 0x38], eax
mov eax, dword [0x47ac24]
mov dword [ebp - 0x2c], eax
jmp 0x427457
test ebx, ebx
jne 0x427407
cmp byte [0x4be1ac], 0
jne 0x42743e
push 0x4be1ac
push 0x80
call sub.kernel32.dll_GetCurrentDirectoryA
jmp 0x42743e
lea eax, [ebp - 0x26c]
push eax
mov ecx, ebx
dec ecx
mov eax, esi
mov edx, 1
call fcn.00402798
lea edx, [ebp - 0x26c]
lea eax, [ebp - 0x274]
call fcn.00404e58
mov edx, dword [ebp - 0x274]
mov eax, 0x4be1ac
call fcn.00409294
mov dword [ebp - 0x3c], 0x4be1ac
mov eax, dword [0x47b428]
mov eax, dword [eax]
mov dword [ebp - 0x38], eax
mov eax, dword [0x47ac28]
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x34], 4
lea eax, [ebp - 0x68]
push eax
call sub.comdlg32.dll_GetOpenFileNameA
test eax, eax
je 0x4274f4
cmp dword [ebp - 0xc], 0
jne 0x42749a
movzx ecx, word [ebp - 0x30]
dec ecx
mov edx, 0x4be12c
mov eax, edi
call fcn.00402894
movzx eax, word [ebp - 0x30]
mov byte [eax + 0x4be12b], 0x5c
mov byte [eax + 0x4be12c], 0
jmp 0x4274bd
movzx ecx, word [ebp - 0x30]
dec ecx
mov edx, 0x4be1ac
mov eax, edi
call fcn.00402894
movzx eax, word [ebp - 0x30]
mov byte [eax + 0x4be1ab], 0x5c
mov byte [eax + 0x4be1ac], 0
lea edx, [ebp - 0x378]
mov eax, edi
call fcn.00409400
mov edx, dword [ebp - 0x378]
lea eax, [ebp - 0x374]
mov ecx, 0xff
call fcn.00404e90
lea edx, [ebp - 0x374]
mov eax, esi
mov ecx, dword [ebp - 8]
call fcn.00403044
mov bl, 1
jmp 0x4274f6
xor ebx, ebx
mov eax, edi
call fcn.004026a8
push 0x4be22c
call sub.kernel32.dll_SetCurrentDirectoryA
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x427542
lea eax, [ebp - 0x378]
call fcn.00404bf4
lea eax, [ebp - 0x274]
mov edx, 2
call fcn.00404c18
lea eax, [ebp - 0x16c]
call fcn.00404bf4
ret