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

Disassembly:
push 0xffffffffffffffff
push 0x46f25e
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x7d8
mov eax, dword [0x493790]
push ebp
push esi
push edi
mov dword [esp + 0x7e0], eax
mov edi, ecx
mov ebp, dword [esp + 0x7f4]
mov eax, dword [ebp - 0xc]
test eax, eax
mov dword [esp + 0x7ec], 1
jl 0x408563
push 0x474524
push ebp
call fcn.00448af2
add esp, 8
test eax, eax
je 0x408563
sub eax, ebp
test eax, eax
jle 0x408563
push 2
push eax
lea ecx, [esp + 0x7fc]
call fcn.00402230
mov ebp, dword [esp + 0x7f4]
push 0x30
call fcn.0046032c
add esp, 4
mov dword [esp + 0xc], eax
test eax, eax
mov byte [esp + 0x7ec], 2
je 0x408586
mov ecx, eax
call fcn.00407ce0
jmp 0x408588
xor eax, eax
mov ecx, dword [0x4dee70]
mov dword [ecx*4 + 0x4ae128], eax
mov ecx, dword [esp + 0x7fc]
add eax, 0x18
test ecx, ecx
mov byte [esp + 0x7ec], 1
jne 0x4085ae
push ecx
jmp 0x4085af
push ecx
mov ecx, edi
push eax
call fcn.00406570
mov edx, dword [0x4dee70]
mov eax, dword [edx*4 + 0x4ae128]
mov ecx, dword [esp + 0x800]
mov esi, dword [esp + 0x7f8]
mov dword [eax + 0x20], ecx
mov edx, dword [0x4dee70]
mov eax, dword [edx*4 + 0x4ae128]
mov ecx, dword [0x4dee6c]
mov dword [eax + 0x24], ecx
mov ecx, dword [0x4dee6c]
mov edx, dword [0x4dee70]
mov eax, dword [edx*4 + 0x4ae128]
inc ecx
test esi, esi
mov dword [0x4dee6c], ecx
mov ecx, dword [edi + 0x1c]
mov dword [eax + 8], ecx
mov edx, dword [0x4dee70]
mov ecx, dword [edi + 0x1c]
mov eax, dword [edx*4 + 0x4ae128]
mov dword [eax + 4], ecx
mov ecx, esi
je 0x408646
cmp esi, 0x800
jbe 0x408641
lea esp, [esp]
mov eax, ecx
and eax, 0x7ff
inc ecx
test eax, eax
jne 0x408630
shr ecx, 0xb
jmp 0x408646
mov ecx, 1
add dword [edi + 0x1c], ecx
mov edx, dword [0x4dee70]
mov ecx, dword [edx*4 + 0x4ae128]
lea eax, [esp + 0x7f4]
push eax
call fcn.00402a20
mov ecx, dword [0x4dee70]
mov edx, dword [ecx*4 + 0x4ae128]
mov dword [edx + 0xc], esi
mov eax, dword [0x4dee70]
mov ecx, dword [eax*4 + 0x4ae128]
mov dword [ecx + 0x10], esi
mov esi, dword [esp + 0x804]
push 0x473a35
push esi
call fcn.00447da8
add esp, 8
test eax, eax
je 0x4086f0
lea edx, [esp + 0x10]
push edx
push 0x7d0
call dword [sym.imp.kernel32.dll_GetCurrentDirectoryA]
mov edi, dword [sym.imp.kernel32.dll_SetCurrentDirectoryA]
push esi
call edi
test eax, eax
mov eax, dword [0x4dee70]
mov ecx, dword [eax*4 + 0x4ae128]
jne 0x4086d6
lea edx, [esp + 0x804]
add ecx, 0x14
push edx
call fcn.00402a20
jmp 0x4086f0
push ebp
push esi
add ecx, 0x14
push 0x47451c
push ecx
call fcn.00402a00
add esp, 0x10
lea edx, [esp + 0x10]
push edx
call edi
mov edx, dword [0x4dee70]
inc edx
lea eax, [ebp - 0x10]
mov dword [0x4dee70], edx
mov byte [esp + 0x7ec], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40871f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
lea eax, [esi - 0x10]
mov dword [esp + 0x7ec], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
pop edi
pop esi
pop ebp
jg 0x408747
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov ecx, dword [esp + 0x7d8]
mov dword fs:[0], ecx
mov ecx, dword [esp + 0x7d4]
call fcn.004475ee
add esp, 0x7e4
ret 0x14