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

Disassembly:
mov edx, dword [esp + 8]
mov eax, dword [edx]
sub esp, 0x418
test al, 6
push ebp
push esi
push edi
jne 0x40843d
test al, 0x10
je 0x407ff9
or ecx, 0xffffffff
xor eax, eax
lea esi, [edx + 0x14]
mov edi, esi
repne scasb al, byte es:[edi]
not ecx
mov al, byte [ecx + edx + 0x12]
dec ecx
cmp al, 0x2e
je 0x40843d
push esi
call fcn.0040b4dc
push str.debuginfo
push esi
call fcn.0040af5e
add esp, 0xc
test eax, eax
je 0x40843d
push 0x419684
push esi
call fcn.0040af5e
add esp, 8
test eax, eax
je 0x40843d
push str.backup
push esi
call fcn.00409e30
add esp, 8
test eax, eax
jne 0x40843d
mov edi, dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
lea eax, [esp + 0x18]
push eax
push 0x104
call edi
lea ecx, [esp + 0x18]
push 0x4170dc
push ecx
call fcn.0040a700
lea edx, [esp + 0x20]
push esi
push edx
call fcn.0040a700
lea eax, [esp + 0x28]
push 0x4170dc
push eax
call fcn.0040a700
add esp, 0x18
lea ecx, [esp + 0x320]
push ecx
push 0x104
call edi
lea edx, [esp + 0x10]
push edx
lea eax, [esp + 0x120]
push eax
push 0x103
lea ecx, [esp + 0x24]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFullPathNameA]
push 0
push 0
lea edx, [esp + 0x228]
push edx
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x12c]
push ecx
call fcn.0040a4e2
lea edx, [esp + 0x20]
push edx
lea eax, [esp + 0x134]
push eax
call fcn.0040a6f0
lea ecx, [esp + 0x23c]
push ecx
lea edx, [esp + 0x13c]
push edx
call fcn.0040a700
or ecx, 0xffffffff
xor eax, eax
add esp, 0x24
lea edi, [esp + 0x11c]
repne scasb al, byte es:[edi]
not ecx
mov al, byte [esp + ecx + 0x11a]
dec ecx
cmp al, 0x5c
jne 0x407fb8
or ecx, 0xffffffff
xor eax, eax
lea edi, [esp + 0x11c]
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov byte [esp + ecx + 0x11b], al
mov esi, dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
lea eax, [esp + 0x11c]
push eax
call esi
test eax, eax
je 0x40843d
mov ecx, dword [esp + 0x428]
push ecx
lea edx, [esp + 0x1c]
push edx
call fcn.00407310
add esp, 8
lea eax, [esp + 0x320]
push eax
call esi
pop edi
pop esi
pop ebp
add esp, 0x418
ret
lea ebp, [edx + 0x14]
push 0x2e
push ebp
call fcn.00409ea6
mov esi, eax
add esp, 8
test esi, esi
je 0x408047
lea ecx, [esi + 1]
push 0x2e
push ecx
call fcn.00409ea6
add esp, 8
test eax, eax
je 0x408031
mov esi, eax
inc eax
push 0x2e
push eax
call fcn.00409ea6
add esp, 8
test eax, eax
jne 0x40801f
push esi
push str..lnk
call fcn.0040af5e
add esp, 8
test eax, eax
je 0x40843d
push 0x2e
push ebp
call fcn.00409ea6
mov esi, eax
add esp, 8
test esi, esi
je 0x408092
lea edx, [esi + 1]
push 0x2e
push edx
call fcn.00409ea6
add esp, 8
test eax, eax
je 0x40807c
mov esi, eax
inc eax
push 0x2e
push eax
call fcn.00409ea6
add esp, 8
test eax, eax
jne 0x40806a
push esi
push str..exe
call fcn.0040af5e
add esp, 8
test eax, eax
je 0x40843d
push 0x2e
push ebp
call fcn.00409ea6
mov esi, eax
add esp, 8
test esi, esi
je 0x4080dd
lea eax, [esi + 1]
push 0x2e
push eax
call fcn.00409ea6
add esp, 8
test eax, eax
je 0x4080c7
mov esi, eax
inc eax
push 0x2e
push eax
call fcn.00409ea6
add esp, 8
test eax, eax
jne 0x4080b5
push esi
push str..com
call fcn.0040af5e
add esp, 8
test eax, eax
je 0x40843d
push 0x2e
push ebp
call fcn.00409ea6
mov esi, eax
add esp, 8
test esi, esi
je 0x408128
lea ecx, [esi + 1]
push 0x2e
push ecx
call fcn.00409ea6
add esp, 8
test eax, eax
je 0x408112
mov esi, eax
inc eax
push 0x2e
push eax
call fcn.00409ea6
add esp, 8
test eax, eax
jne 0x408100
push esi
push str..dll
call fcn.0040af5e
add esp, 8
test eax, eax
je 0x40843d
push 0x2e
push ebp
call fcn.00409ea6
mov esi, eax
add esp, 8
test esi, esi
je 0x408173
lea edx, [esi + 1]
push 0x2e
push edx
call fcn.00409ea6
add esp, 8
test eax, eax
je 0x40815d
mov esi, eax
inc eax
push 0x2e
push eax
call fcn.00409ea6
add esp, 8
test eax, eax
jne 0x40814b
push esi
push str..log
call fcn.0040af5e
add esp, 8
test eax, eax
je 0x40843d
push 0x2e
push ebp
call fcn.00409ea6
mov esi, eax
add esp, 8
test esi, esi
je 0x4081be
lea eax, [esi + 1]
push 0x2e
push eax
call fcn.00409ea6
add esp, 8
test eax, eax
je 0x4081a8
mov esi, eax
inc eax
push 0x2e
push eax
call fcn.00409ea6
add esp, 8
test eax, eax
jne 0x408196
push esi
push str..sue
call fcn.0040af5e
add esp, 8
test eax, eax
je 0x40843d
push str..vix
push ebp
call fcn.00408450
add esp, 8
test eax, eax
jne 0x40843d
push str..mdb
push ebp
call fcn.00408450
add esp, 8
test eax, eax
jne 0x40843d
push str..mjh
push ebp
call fcn.00408450
add esp, 8
test eax, eax
jne 0x40843d
push 0x419630
push ebp
call fcn.00408450
add esp, 8
test eax, eax
jne 0x40843d
push str..bat
push ebp
call fcn.00408450
add esp, 8
test eax, eax
jne 0x40843d
mov ecx, dword [esp + 0x430]
push ebx
push 0x5b
push ecx
mov byte [esp + 0x24], al
call fcn.00409ea6
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x4082ad
push 0x5d
push ebx
call fcn.00409ea6
add esp, 8
test eax, eax
je 0x4082ad
or ecx, 0xffffffff
xor eax, eax
lea edi, [ebx + 1]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
lea edx, [esp + 0x1c]
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
shr ecx, 2
dec edi
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea eax, [esp + 0x1c]
and ecx, 3
push 0x5d
push eax
rep movsb byte es:[edi], byte [esi]
call fcn.00409ea6
push 0x5d
push ebx
mov byte [eax], 0
call fcn.00409ea6
inc eax
push 0x5b
push eax
call fcn.00409ea6
mov ebx, eax
add esp, 0x18
test ebx, ebx
jne 0x408249
or ecx, 0xffffffff
xor eax, eax
mov edi, ebp
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov ebx, ecx
or ecx, 0xffffffff
mov esi, edi
lea edx, [esp + 0x1c]
mov edi, edx
repne scasb al, byte es:[edi]
mov ecx, ebx
shr ecx, 2
dec edi
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea eax, [esp + 0x1c]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call fcn.0040b4dc
lea ecx, [esp + 0x20]
push ecx
call fcn.00409c60
push str..txt
push ebp
mov edi, eax
mov dword [esp + 0x28], edx
call fcn.00408450
mov ebx, dword [esp + 0x43c]
add esp, 0x10
test eax, eax
jne 0x408364
mov eax, dword [ebx + 0x22c]
xor esi, esi
cmp eax, esi
mov dword [esp + 0x10], esi
jle 0x408364
mov edx, dword [ebx + 0x228]
mov ecx, dword [esi + edx]
cmp ecx, edi
lea eax, [esi + edx]
jne 0x40834e
mov edx, dword [eax + 4]
cmp edx, dword [esp + 0x18]
jne 0x40834e
mov ecx, dword [esp + 0x434]
mov edx, dword [eax + 0xc]
push ecx
push edx
push ebp
push 0x4195f4
call fcn.00406650
add esp, 0x10
mov eax, dword [esp + 0x10]
mov ecx, dword [ebx + 0x22c]
inc eax
add esi, 0x10
cmp eax, ecx
mov dword [esp + 0x10], eax
jl 0x40831b
push ebx
call fcn.004084b0
mov eax, dword [ebx + 0x22c]
mov ecx, dword [ebx + 0x228]
shl eax, 4
add eax, ecx
mov ecx, dword [esp + 0x1c]
mov dword [eax], edi
mov dword [eax + 4], ecx
mov edx, dword [ebx + 0x22c]
mov eax, dword [ebx + 0x228]
mov ecx, dword [esp + 0x438]
shl edx, 4
mov dword [edx + eax + 0xc], ecx
or ecx, 0xffffffff
xor eax, eax
mov edi, ebp
repne scasb al, byte es:[edi]
not ecx
push ecx
call fcn.00409960
mov edx, dword [ebx + 0x22c]
mov ecx, dword [ebx + 0x228]
shl edx, 4
mov dword [edx + ecx + 8], eax
mov edx, dword [ebx + 0x22c]
or ecx, 0xffffffff
shl edx, 4
xor eax, eax
add esp, 8
mov edi, ebp
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
shr ecx, 2
mov edi, edx
mov edx, dword [ebx + 0x228]
mov edi, dword [edi + edx + 8]
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [ebx + 0x22c]
mov eax, dword [ebx + 0x230]
inc edi
mov ecx, edi
lea edx, [eax - 0x10]
cmp ecx, edx
mov dword [ebx + 0x22c], edi
jl 0x408437
add eax, 0x3e8
mov dword [ebx + 0x230], eax
shl eax, 4
push eax
mov eax, dword [ebx + 0x228]
push eax
call fcn.00409990
add esp, 8
mov dword [ebx + 0x228], eax
call fcn.00406910
pop ebx
pop edi
pop esi
pop ebp
add esp, 0x418
ret