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

Disassembly:
push 0xffffffffffffffff
push 0x42f6a3
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xa04
push ebx
push ebp
push esi
push edi
mov ebp, ecx
mov edi, 0x43b5cc
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x7bc]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push 0
mov eax, ecx
mov esi, edi
mov edi, edx
mov dword [esp + 0xa20], 0
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0xa28]
call fcn.004231bf
mov edi, eax
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x148]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
xor edx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x148]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov ebx, ecx
test ebx, ebx
jle 0x40577d
cmp byte [esp + edx + 0x148], 0x5c
je 0x405700
test edx, edx
jle 0x40573f
mov al, byte [esp + edx + 0x147]
dec edx
cmp al, 0x5c
jne 0x4056f0
test edx, edx
jle 0x40573f
lea edi, [esp + edx + 0x149]
or ecx, 0xffffffff
xor eax, eax
lea esi, [esp + 0x7bc]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov dword [esp + 0x10], esi
mov eax, ecx
mov esi, edi
mov edi, dword [esp + 0x10]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov byte [esp + edx + 0x148], 0
jmp 0x405772
lea edi, [esp + 0x148]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x7bc]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov byte [esp + 0x148], 0
lea edx, [ebx + 0x64]
cmp edx, ebx
jl 0x4056e6
lea ecx, [esp + 0x4b8]
push ecx
push 0x104
call dword [sym.imp.KERNEL32.DLL_GetCurrentDirectoryA]
mov al, byte [esp + 0x148]
test al, al
jne 0x4057c6
lea edi, [esp + 0x4b8]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x148]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [sym.imp.KERNEL32.DLL_SetCurrentDirectoryA]
lea ecx, [esp + 0x148]
push ecx
call edi
lea edx, [esp + 0x3a0]
lea eax, [esp + 0x7bc]
push edx
push eax
call fcn.004131c6
mov esi, eax
or ebx, 0xffffffff
add esp, 8
cmp esi, ebx
mov dword [esp + 0x10], esi
jne 0x40584d
mov edx, dword [ebp]
push 0
lea eax, [esp + 0x20]
push 0x12c
push eax
mov ecx, ebp
mov byte [esp + 0x28], 0
call dword [edx + 0x18]
cmp eax, 0x12c
jne 0x405833
push 0x43b524
push ebp
call fcn.00402b80
add esp, 8
lea ecx, [esp + 0x4b8]
push ecx
call edi
lea ecx, [esp + 0xa24]
mov dword [esp + 0xa1c], ebx
call fcn.00422dd3
xor eax, eax
jmp 0x405a47
mov ebx, 1
cmp byte [esp + 0x3b4], 0x2e
je 0x4059a8
cmp dword [esp + 0x3a0], 0x10
je 0x4059a8
lea edi, [esp + 0x3b4]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x1c]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push 0x43b0d4
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x20]
push ecx
call fcn.004122d1
add esp, 8
test eax, eax
je 0x4059a4
push eax
call fcn.00412223
mov edx, dword [ebp]
add esp, 4
lea eax, [esp + 0x1c]
mov ecx, ebp
push 0
push 0x12c
push eax
call dword [edx + 0x18]
cmp eax, 0x12c
jl 0x4059c3
or ecx, 0xffffffff
lea edi, [esp + 0x148]
xor eax, eax
lea edx, [esp + 0x5bc]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
shr ecx, 2
mov edi, edx
lea edx, [esp + 0x5bc]
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, 0x43b7a4
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea edx, [esp + 0x5bc]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x1c]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea eax, [esp + 0x5bc]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
push ecx
mov ecx, esp
mov dword [esp + 0x1c], esp
push eax
call fcn.00422dfd
push ecx
lea edx, [esp + 0x5c4]
mov ecx, esp
mov dword [esp + 0x1c], esp
push edx
mov byte [esp + 0xa28], bl
call fcn.00422dfd
mov ecx, ebp
mov byte [esp + 0xa24], 0
call fcn.00405a70
test eax, eax
je 0x4059dc
mov esi, dword [esp + 0x10]
lea eax, [esp + 0x3a0]
push eax
push esi
call fcn.00413293
add esp, 8
cmp eax, 0xffffffff
je 0x4059f7
jmp 0x405852
mov esi, 0x12c
lea edi, [esp + eax + 0x1c]
sub esi, eax
mov edx, dword [ebp]
push 0
push esi
push edi
mov ecx, ebp
call dword [edx + 0x18]
jmp 0x4059ce
lea ecx, [esp + 0xa24]
mov dword [esp + 0xa1c], 0xffffffff
call fcn.00422dd3
xor eax, eax
jmp 0x405a47
lea eax, [esp + 0x4b8]
push eax
call dword [sym.imp.KERNEL32.DLL_SetCurrentDirectoryA]
mov edx, dword [ebp]
push 0
lea eax, [esp + 0x20]
push 0x12c
push eax
mov ecx, ebp
mov byte [esp + 0x28], 0
call dword [edx + 0x18]
cmp eax, 0x12c
mov dword [esp + 0xa1c], 0xffffffff
lea ecx, [esp + 0xa24]
je 0x405a40
call fcn.00422dd3
xor eax, eax
jmp 0x405a47
call fcn.00422dd3
mov eax, ebx
mov ecx, dword [esp + 0xa14]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
pop ebx
add esp, 0xa10
ret 4