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

Disassembly:
push ebp
mov ebp, esp
push ecx
mov ecx, 0x4b
push 0
push 0
dec ecx
jne 0x66c81
push ecx
xchg dword [ebp - 4], ecx
push ebx
mov byte [ebp - 0x11], cl
mov dword [ebp - 0xc], edx
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x10]
call fcn.00014684
xor eax, eax
push ebp
push 0x66f17
push dword fs:[eax]
mov dword fs:[eax], esp
cmp dword [ebp - 0xc], 0
je 0x66d47
push 0x66f2c
push dword [ebp - 0x10]
push 0x66f70
lea edx, [ebp - 0x134]
mov al, byte [ebp - 0x11]
call fcn.0001a388
lea edx, [ebp - 0x134]
lea eax, [ebp - 0x34]
call fcn.00013c78
push dword [ebp - 0x34]
push 0x66f7c
lea edx, [ebp - 0x238]
mov al, byte [ebp + 8]
call fcn.0001a388
lea edx, [ebp - 0x238]
lea eax, [ebp - 0x138]
call fcn.00013c78
push dword [ebp - 0x138]
push 0x66f88
lea eax, [ebp - 0x30]
mov edx, 5
call fcn.00013d94
mov edx, dword [ebp - 0x30]
lea eax, [ebp - 0x2c]
call fcn.00014240
push dword [ebp - 0x2c]
lea eax, [ebp - 0x28]
mov edx, 3
call fcn.00014394
mov edx, dword [ebp - 0x28]
lea ecx, [ebp - 0x24]
mov eax, dword [ebp - 0xc]
call fcn.00037f70
lea eax, [ebp - 0x23c]
mov edx, dword [ebp - 0x10]
call fcn.00013c9c
mov eax, dword [ebp - 0x23c]
lea edx, [ebp - 0x18]
call fcn.00019d94
lea eax, [ebp - 0x20]
mov edx, 0x800
call fcn.00014640
mov eax, dword [ebp - 0x20]
call fcn.000142b4
push eax
push 0x400
call sub.kernel32.dll_GetCurrentDirectoryW
mov edx, eax
lea eax, [ebp - 0x20]
call fcn.00014640
lea edx, [ebp - 0x240]
mov eax, dword [ebp - 0x18]
call fcn.0001902c
mov eax, dword [ebp - 0x240]
call fcn.00013e98
push eax
call sub.kernel32.dll_SetCurrentDirectoryA
xor eax, eax
mov dword [ebp - 4], eax
xor eax, eax
mov dword [ebp - 8], eax
lea edx, [ebp - 0x1c]
mov eax, dword [ebp - 0x10]
call fcn.0001bae0
lea eax, [ebp - 0x244]
mov edx, dword [ebp - 0x18]
call fcn.00014240
mov edx, dword [ebp - 0x244]
mov eax, dword [ebp - 0x1c]
call fcn.000143dc
je 0x66e48
mov eax, dword [ebp - 0x10]
call fcn.0001bb64
test al, al
je 0x66df7
push ebp
mov eax, dword [ebp - 0x1c]
call fcn.000667b8
pop ecx
jmp 0x66e48
cmp dword [ebp - 0xc], 0
je 0x66e48
lea eax, [ebp - 0x24c]
mov ecx, dword [ebp - 0x10]
mov edx, 0x66f90
call fcn.00014330
mov edx, dword [ebp - 0x24c]
lea ecx, [ebp - 0x248]
mov eax, dword [ebp - 0xc]
call fcn.000382b0
lea edx, [ebp - 0x254]
mov eax, 2
call fcn.00018f2c
mov edx, dword [ebp - 0x254]
lea ecx, [ebp - 0x250]
mov eax, dword [ebp - 0xc]
call fcn.00038234
mov eax, dword [ebp - 0x20]
call fcn.0001bb64
test al, al
je 0x66e62
mov eax, dword [ebp - 0x20]
call fcn.000142b4
push eax
call sub.kernel32.dll_SetCurrentDirectoryW
cmp dword [ebp - 0xc], 0
je 0x66ea4
mov eax, dword [ebp - 8]
xor edx, edx
push edx
push eax
lea eax, [ebp - 0x260]
call fcn.00018ef8
mov ecx, dword [ebp - 0x260]
lea eax, [ebp - 0x25c]
mov edx, 0x66fbc
call fcn.00013d20
mov edx, dword [ebp - 0x25c]
lea ecx, [ebp - 0x258]
mov eax, dword [ebp - 0xc]
call fcn.00037ef4
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x66f1e
lea eax, [ebp - 0x260]
mov edx, 5
call fcn.00013a78
lea eax, [ebp - 0x24c]
mov edx, 3
call fcn.0001409c
lea eax, [ebp - 0x240]
mov edx, 2
call fcn.00013a78
lea eax, [ebp - 0x138]
call fcn.00013a54
lea eax, [ebp - 0x34]
mov edx, 2
call fcn.00013a78
lea eax, [ebp - 0x2c]
mov edx, 5
call fcn.0001409c
lea eax, [ebp - 0x18]
call fcn.00013a54
lea eax, [ebp - 0x10]
call fcn.00014084
ret