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

Disassembly:
push 0xffffffffffffffff
push 0x43d7dd
mov eax, dword fs:[0]
push eax
sub esp, 0x214
mov eax, dword [0x45302c]
xor eax, esp
mov dword [esp + 0x210], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x45302c]
xor eax, esp
push eax
lea eax, [esp + 0x228]
mov dword fs:[0], eax
mov ebp, dword [esp + 0x238]
lea eax, [esp + 0x124]
push eax
push 0x100
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
call fcn.00419bf9
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x40e87f
push 0x80004005
call fcn.00401000
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x1c], eax
mov eax, dword [ebp]
sub eax, 0x10
push eax
mov dword [esp + 0x234], 0
call fcn.00402930
lea edi, [eax + 0x10]
add esp, 4
mov dword [esp + 0x20], edi
mov byte [esp + 0x230], 1
call fcn.00419bf9
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x40e8d2
push 0x80004005
call fcn.00401000
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x14], eax
push 0x5c
mov bl, 2
push edi
mov byte [esp + 0x238], bl
call fcn.0042601e
add esp, 8
test eax, eax
je 0x40e905
sub eax, edi
cmp eax, 0xffffffff
jne 0x40e9c4
xor eax, eax
jmp 0x40e910
mov cl, byte [esp + eax + 0x124]
mov byte [esp + eax + 0x24], cl
add eax, 1
test cl, cl
jne 0x40e910
lea ecx, [esp + 0x20]
push ecx
lea edx, [esp + 0x1c]
push 0x443a98
push edx
call fcn.0040e220
add esp, 0xc
push eax
lea ecx, [esp + 0x18]
mov byte [esp + 0x234], 3
call fcn.00403790
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
mov byte [esp + 0x230], bl
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40e972
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [esp + 0x14]
push ecx
lea edx, [esp + 0x28]
push edx
lea eax, [esp + 0x20]
push eax
call fcn.0040e220
add esp, 0xc
push eax
lea ecx, [esp + 0x18]
mov byte [esp + 0x234], 4
call fcn.00403790
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
mov byte [esp + 0x230], bl
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40e9ce
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x40e9ce
push ebp
lea ecx, [esp + 0x18]
call fcn.00403790
mov esi, dword [esp + 0x14]
push 0x443240
push esi
call fcn.0042562a
add esp, 8
test eax, eax
je 0x40ea6e
lea ecx, [esp + 0x14]
push ecx
mov ecx, ebp
call fcn.00403790
lea eax, [esi - 0x10]
or ecx, 0xffffffff
lea edx, [eax + 0xc]
mov byte [esp + 0x230], 1
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40ea18
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [edi - 0x10]
or edx, 0xffffffff
lea ecx, [eax + 0xc]
mov byte [esp + 0x230], 0
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40ea3c
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
mov dword [esp + 0x230], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40ea67
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov al, 1
jmp 0x40ebdb
lea ecx, [esp + 0x124]
push ecx
push str.CurDir
call fcn.0040d800
add esp, 8
lea edx, [esp + 0x24]
mov cl, byte [eax]
mov byte [edx], cl
add eax, 1
add edx, 1
test cl, cl
jne 0x40ea87
lea edx, [esp + 0x24]
push edx
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
push 0
push str.CurDir
call fcn.0040d720
lea eax, [esp + 0x28]
push eax
lea ecx, [esp + 0x24]
push 0x443a98
push ecx
call fcn.0040e220
add esp, 0x14
push eax
lea ecx, [esp + 0x18]
mov byte [esp + 0x234], 5
call fcn.00403790
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
mov byte [esp + 0x230], bl
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40eafc
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [esp + 0x14]
push ecx
lea edx, [esp + 0x28]
push edx
lea eax, [esp + 0x20]
push eax
call fcn.0040e220
add esp, 0xc
push eax
lea ecx, [esp + 0x18]
mov byte [esp + 0x234], 6
call fcn.00403790
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
mov byte [esp + 0x230], bl
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40eb4c
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov esi, dword [esp + 0x14]
push 0x443240
push esi
call fcn.0042562a
add esp, 8
test eax, eax
jne 0x40e9e8
lea eax, [esi - 0x10]
mov byte [esp + 0x230], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40eb8a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [edi - 0x10]
mov byte [esp + 0x230], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40ebae
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
mov dword [esp + 0x230], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40ebd9
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor al, al
mov ecx, dword [esp + 0x228]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x210]
xor ecx, esp
call fcn.00424179
add esp, 0x220
ret 4