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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x42c
mov eax, dword [0x4ae480]
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.0047df00
add esp, 0xc
xor eax, eax
mov word [ebp - 0x210], ax
push 0x206
push eax
lea eax, [ebp - 0x20e]
push eax
call fcn.0047df00
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 0x41bd59
movzx eax, word [edi + ecx]
mov esi, eax
test ax, ax
je 0x41bd52
mov word [ecx], si
add ecx, 2
sub edx, 1
jne 0x41bd30
jmp 0x41bd56
test edx, edx
jne 0x41bd59
sub ecx, 2
xor eax, eax
lea edx, [ebp - 0x210]
mov word [ecx], ax
mov esi, edx
mov ax, word [ebp - 0x210]
test ax, ax
je 0x41bd9d
movzx eax, ax
lea ecx, [ebp - 0x20e]
nop dword [eax + eax]
cmp ax, 0x5c
je 0x41bd8c
cmp ax, 0x2f
jne 0x41bd8e
mov esi, ecx
movzx eax, word [edx + 2]
add edx, 2
add ecx, 2
test ax, ax
jne 0x41bd80
mov edi, dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
xor eax, eax
mov word [esi], ax
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
cmp word [ebp - 0x210], ax
je 0x41bde0
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 0x41bde0
call esi
test eax, eax
jne 0x41bf63
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 0x41be3c
push dword [ebx]
call esi
push eax
push 0x11d
push edi
call fcn.004196f0
add esp, 0x10
test eax, eax
jne 0x41bf5d
mov eax, dword [ebp - 0x420]
mov ecx, eax
call fcn.00419870
mov ebx, eax
mov dword [ebp - 0x42c], ebx
test ebx, ebx
je 0x41bf5d
mov ecx, ebx
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x41be58
sub ecx, edx
mov edi, ebx
lea eax, [ecx + ebx]
mov dword [ebp - 0x428], eax
cmp ebx, eax
jae 0x41bf54
mov edx, 2
nop dword [eax]
mov al, byte [edi]
xor ebx, ebx
mov esi, edi
test al, al
js 0x41be9c
nop word [eax + eax]
cmp al, 0x20
ja 0x41be9c
mov al, byte [esi + 1]
inc esi
test al, al
jns 0x41be90
mov al, byte [esi]
mov ecx, esi
mov dword [ebp - 0x424], ecx
test al, al
je 0x41bf00
nop word [eax + eax]
cmp al, 0xa
je 0x41bec0
cmp al, 0xd
je 0x41bec0
mov al, byte [esi + 1]
inc esi
test al, al
jne 0x41beb0
cmp esi, ecx
jbe 0x41bf00
mov edi, esi
sub edi, ecx
mov ecx, 0xffffffff
lea eax, [edi + 1]
mul edx
cmovb eax, ecx
push eax
call fcn.0047c4da
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 dword [eax]
mov al, byte [esi]
cmp al, 0xa
je 0x41bf0a
cmp al, 0xd
jne 0x41bf0d
inc esi
jmp 0x41bf00
mov edi, esi
test ebx, ebx
je 0x41bf3d
push ebx
push 0x4a6090
push dword [ebp - 0x41c]
call fcn.004196d0
mov ecx, dword [ebp - 0x41c]
add esp, 0xc
mov edx, ebx
call fcn.0041c900
push ebx
call fcn.004568b0
add esp, 4
mov edx, 2
cmp esi, dword [ebp - 0x428]
jb 0x41be80
mov ebx, dword [ebp - 0x42c]
push ebx
call fcn.004568b0
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 0x41bf81
lea eax, [ebp - 0x418]
push eax
call edi
mov eax, dword [ebp - 0x420]
cmp eax, 0xffffffff
je 0x41bf93
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.0047c26b
mov esp, ebp
pop ebp
ret