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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x42c
mov eax, dword [0x4af480]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
mov dword [ebp - 0x41c], eax
xor eax, eax
push 0x206
push eax
mov word [ebp - 0x418], ax
lea eax, [ebp - 0x416]
push eax
mov dword [ebp - 0x420], 0xffffffff
call fcn.0047ee20
add esp, 0xc
xor eax, eax
mov word [ebp - 0x210], ax
push 0x206
push eax
lea eax, [ebp - 0x20e]
push eax
call fcn.0047ee20
mov edi, dword [ebx]
lea ecx, [ebp - 0x210]
mov eax, ecx
add esp, 0xc
mov edx, 0x104
sub edi, eax
nop dword [eax]
lea eax, [edx + 0x7ffffefa]
test eax, eax
je 0x41c019
movzx eax, word [edi + ecx]
mov esi, eax
test ax, ax
je 0x41c012
mov word [ecx], si
add ecx, 2
sub edx, 1
jne 0x41bff0
jmp 0x41c016
test edx, edx
jne 0x41c019
sub ecx, 2
xor eax, eax
mov word [ecx], ax
lea ecx, [ebp - 0x210]
mov ax, word [ebp - 0x210]
mov edx, ecx
test ax, ax
je 0x41c053
movzx eax, ax
cmp ax, 0x5c
je 0x41c046
cmp ax, 0x2f
je 0x41c046
add ecx, 2
jmp 0x41c04b
add ecx, 2
mov edx, ecx
movzx eax, word [ecx]
test ax, ax
jne 0x41c035
mov edi, dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
xor eax, eax
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
mov word [edx], ax
cmp word [ebp - 0x210], ax
je 0x41c096
lea eax, [ebp - 0x418]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
lea eax, [ebp - 0x210]
push eax
call edi
test eax, eax
jne 0x41c096
call esi
test eax, eax
jne 0x41c213
mov edi, dword [ebp - 0x41c]
push 0
lea eax, [edi + 4]
push eax
push 0x104
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_GetFullPathNameW]
push 0
push 0
push 3
push 0
push 1
push 0x80000000
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x420], eax
cmp eax, 0xffffffff
jne 0x41c0f4
call esi
push dword [ebx]
mov esi, eax
push esi
push 0x11d
push edi
call fcn.00419770
add esp, 0x10
test esi, esi
jne 0x41c20d
mov eax, dword [ebp - 0x420]
mov ecx, eax
call fcn.004198f0
mov ebx, eax
mov dword [ebp - 0x42c], ebx
test ebx, ebx
je 0x41c20d
mov ecx, ebx
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x41c110
sub ecx, edx
mov edi, ebx
lea eax, [ecx + ebx]
mov dword [ebp - 0x428], eax
cmp ebx, eax
jae 0x41c204
mov edx, 2
mov al, byte [edi]
xor ebx, ebx
mov esi, edi
test al, al
js 0x41c14c
nop dword [eax + eax]
cmp al, 0x20
ja 0x41c14c
mov al, byte [esi + 1]
inc esi
test al, al
jns 0x41c140
mov al, byte [esi]
mov ecx, esi
mov dword [ebp - 0x424], ecx
test al, al
je 0x41c1b0
nop word [eax + eax]
cmp al, 0xa
je 0x41c170
cmp al, 0xd
je 0x41c170
mov al, byte [esi + 1]
inc esi
test al, al
jne 0x41c160
cmp esi, ecx
jbe 0x41c1b0
mov edi, esi
sub edi, ecx
xor ecx, ecx
lea eax, [edi + 1]
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0047d547
add esp, 4
mov ebx, eax
push edi
push ebx
push edi
push dword [ebp - 0x424]
push 0
push 0
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
xor eax, eax
mov word [ebx + edi*2], ax
nop word [eax + eax]
mov al, byte [esi]
cmp al, 0xa
je 0x41c1ba
cmp al, 0xd
jne 0x41c1bd
inc esi
jmp 0x41c1b0
mov edi, esi
test ebx, ebx
je 0x41c1ed
push ebx
push 0x4a70f8
push dword [ebp - 0x41c]
call fcn.00419750
mov ecx, dword [ebp - 0x41c]
add esp, 0xc
mov edx, ebx
call fcn.0041cbb0
push ebx
call fcn.00457d30
add esp, 4
mov edx, 2
cmp esi, dword [ebp - 0x428]
jb 0x41c131
mov ebx, dword [ebp - 0x42c]
push ebx
call fcn.00457d30
add esp, 4
mov edi, dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
mov eax, dword [ebp - 0x41c]
xor ecx, ecx
mov word [eax + 4], cx
cmp word [ebp - 0x418], cx
je 0x41c231
lea eax, [ebp - 0x418]
push eax
call edi
mov eax, dword [ebp - 0x420]
cmp eax, 0xffffffff
je 0x41c243
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0047d2db
mov esp, ebp
pop ebp
ret