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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x66c456
mov eax, dword fs:[0]
push eax
sub esp, 0x3c
mov eax, dword [0x718924]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 0x44], edi
mov ebx, dword [ebp + 8]
mov dword [ebp - 0x48], edi
mov dword [edi], 0
mov dword [edi + 4], 0
mov dword [edi + 8], 0
mov dword [ebp - 4], 0
mov dword [edi + 0xc], 0
lea eax, [ebp - 0x28]
mov byte [ebp - 4], 1
push eax
mov dword [edi + 0x10], 0
mov dword [edi + 0x14], 0
mov dword [edi + 0x18], 0
call fcn.00477cc0
push 0x674598
push eax
lea eax, [ebp - 0x40]
mov byte [ebp - 4], 2
push eax
call fcn.004481e0
add esp, 0x10
mov edx, dword [ebp - 0x14]
mov byte [ebp - 4], 4
cmp edx, 8
jb 0x477aae
mov ecx, dword [ebp - 0x28]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x477aa4
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x477c2c
push edx
push ecx
call fcn.004cb4db
add esp, 8
xor eax, eax
mov dword [ebp - 0x18], 0
cmp dword [ebp - 0x2c], 8
mov word [ebp - 0x28], ax
lea eax, [ebp - 0x40]
cmovae eax, dword [ebp - 0x40]
push eax
mov dword [ebp - 0x14], 7
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov dword [edi + 0x10], eax
test eax, eax
je 0x477b78
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.SetDllDirectoryW
push eax
call esi
push str.GetDllDirectoryW
push dword [edi + 0x10]
mov dword [edi + 0x14], eax
call esi
mov dword [edi + 0x18], eax
test eax, eax
je 0x477b62
lea ecx, [ebp - 0x44]
mov dword [ebp - 0x44], 0
push ecx
push 1
call eax
mov esi, eax
xor ecx, ecx
mov edx, 2
lea eax, [esi + 1]
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.004cba04
mov ecx, eax
add esp, 4
mov eax, dword [edi + 8]
mov dword [edi + 8], ecx
test eax, eax
je 0x477b46
push eax
call fcn.004cb4e9
mov ecx, dword [edi + 8]
add esp, 4
lea eax, [esi*2 + 2]
push eax
push 0
push ecx
call fcn.004e30c0
mov eax, dword [edi + 0x18]
add esp, 0xc
push dword [edi + 8]
push esi
call eax
mov ecx, dword [edi + 0x14]
test ecx, ecx
je 0x477b78
cmp dword [ebx + 0x14], 8
mov eax, ebx
jb 0x477b73
mov eax, dword [ebx]
push eax
call ecx
mov dword [edi], eax
push 0x208
call fcn.004cba04
mov ecx, dword [edi + 0xc]
add esp, 4
mov dword [edi + 0xc], eax
test ecx, ecx
je 0x477b9b
push ecx
call fcn.004cb4e9
mov eax, dword [edi + 0xc]
add esp, 4
push 0x208
push 0
push eax
call fcn.004e30c0
add esp, 0xc
push dword [edi + 0xc]
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
test eax, eax
je 0x477bd6
cmp eax, 0x200
jae 0x477bd6
cmp dword [ebx + 0x14], 8
jb 0x477bcc
mov ebx, dword [ebx]
push ebx
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
mov dword [edi + 4], eax
mov edx, dword [ebp - 0x2c]
cmp edx, 8
jb 0x477c0c
mov ecx, dword [ebp - 0x40]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x477c02
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x477c31
push edx
push ecx
call fcn.004cb4db
add esp, 8
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004cb998
mov esp, ebp
pop ebp
ret 4
call fcn.004e6589
call fcn.004e6589
int3