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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x640
mov eax, dword [0x408030]
mov ecx, dword [ebp + 0x10]
push esi
mov dword [esp + 0x640], eax
push edi
lea eax, [esp + 8]
push eax
push ecx
mov word [esp + 0x10], 0x20
mov word [esp + 0x14], 0x22
call fcn.00401356
add esp, 8
lea edx, [esp + 0x538]
mov cl, byte [eax]
inc eax
mov byte [edx], cl
inc edx
test cl, cl
jne 0x401040
lea edx, [esp + 0xc]
push edx
push 0
call fcn.00401356
mov esi, eax
xor eax, eax
mov ecx, 0x41
lea edi, [esp + 0x18]
lea edx, [esp + 0x18]
add esp, 8
rep stosd dword es:[edi], eax
mov eax, esi
sub edx, esi
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x401070
lea eax, [esp + 8]
push eax
push 0
call fcn.00401356
mov edx, eax
xor eax, eax
add esp, 8
test edx, edx
mov ecx, 0x41
lea edi, [esp + 0x328]
rep stosd dword es:[edi], eax
je 0x4010fb
nop
mov eax, edx
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4010a2
lea edi, [esp + 0x328]
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x4010b3
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 8]
push ecx
push 0
call fcn.00401356
mov edx, eax
add esp, 8
test edx, edx
je 0x4010fb
lea edi, [esp + 0x328]
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x4010e8
mov ax, word [0x406124]
mov word [edi], ax
jmp 0x4010a0
mov esi, dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
lea ecx, [esp + 0x10]
push ecx
call esi
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
lea edx, [esp + 0x10]
push edx
push 0x104
call edi
push str.....
call esi
lea eax, [esp + 0x10]
push eax
push 0x104
call edi
lea eax, [esp + 0x10]
lea edx, [eax + 1]
lea ebx, [ebx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x401140
sub eax, edx
mov edx, eax
mov al, byte [esp + edx + 0x10]
cmp al, 0x5c
je 0x4011a0
cmp al, 0x2f
je 0x4011a0
xor eax, eax
dec edx
mov ecx, 0x41
lea edi, [esp + 0x430]
push edx
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x14]
push ecx
lea edx, [esp + 0x438]
push edx
call fcn.004012d5
add esp, 0xc
mov ecx, 0x41
xor eax, eax
lea edi, [esp + 0x10]
rep stosd dword es:[edi], eax
jmp 0x401190
mov cl, byte [esp + eax + 0x430]
mov byte [esp + eax + 0x10], cl
inc eax
test cl, cl
jne 0x401190
xor eax, eax
mov ecx, 0x41
lea edi, [esp + 0x220]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x10]
mov word [esp + 0x220], 0x22
mov edx, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4011c0
lea edi, [esp + 0x220]
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x4011d1
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x220]
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x4011f1
mov ax, word [0x406118]
mov word [edi], ax
xor eax, eax
mov ecx, 0x41
lea edi, [esp + 0x118]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x10]
mov edx, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x401218
lea edi, [esp + 0x118]
sub eax, edx
dec edi
lea esp, [esp]
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x401230
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x118]
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x401250
mov cx, word [0x406114]
mov word [edi], cx
lea edi, [esp + 0x118]
dec edi
lea ebx, [ebx]
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x401270
mov edx, dword [str.Setup.exe]
mov eax, dword [0x40610c]
mov cx, word [0x406110]
mov dword [edi], edx
push 0
mov dword [edi + 4], eax
lea edx, [esp + 0x32c]
push edx
lea eax, [esp + 0x228]
push eax
mov word [edi + 8], cx
push str.COINSTALLER
lea ecx, [esp + 0x128]
push ecx
mov edx, ecx
push edx
push 1
call fcn.004013ec
mov ecx, dword [esp + 0x660]
add esp, 0x1c
xor eax, eax
call fcn.00401435
pop edi
pop esi
mov esp, ebp
pop ebp
ret 0x10