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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push esi
mov esi, dword [ebp + 8]
test esi, esi
je 0x40e6ef
cmp byte [esi], 0
je 0x40e6ef
push ebx
mov ebx, 0x104
push edi
push ebx
call fcn.004258e9
test eax, eax
pop ecx
mov dword [ebp - 4], eax
mov edi, 0x47f994
jne 0x40e4fa
mov ecx, edi
call fcn.0041d704
push eax
call fcn.0041e30a
pop ecx
push ebx
call fcn.004258e9
test eax, eax
pop ecx
mov dword [ebp - 0x10], eax
jne 0x40e516
mov ecx, edi
call fcn.0041d704
push eax
call fcn.0041e30a
pop ecx
push dword [ebp - 0x10]
push ebx
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
mov al, byte [esi + 1]
cmp al, 0x3a
jne 0x40e54d
cmp byte [esi + 2], 0x5c
jne 0x40e54d
mov al, byte [esi]
and byte [ebp + 0xb], 0
mov byte [ebp + 8], al
lea eax, [ebp + 8]
push eax
mov byte [ebp + 9], 0x3a
mov byte [ebp + 0xa], 0x5c
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
add esi, 3
jmp 0x40e5a8
cmp byte [esi], 0x5c
jne 0x40e6c8
cmp al, 0x5c
jne 0x40e6c8
lea eax, [esi + 2]
push 0x5c
push eax
call fcn.004253c0
pop ecx
test eax, eax
pop ecx
je 0x40e6c8
inc eax
push 0x5c
push eax
call fcn.004253c0
mov edi, eax
pop ecx
test edi, edi
pop ecx
je 0x40e6d5
cmp byte [edi + 1], 0
lea eax, [edi + 1]
mov dword [ebp + 8], eax
je 0x40e6d5
and byte [edi], 0
push esi
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
mov esi, dword [ebp + 8]
mov byte [edi], 0x5c
push dword [ebp - 4]
push ebx
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
mov edi, dword [sym.imp.KERNEL32.dll_lstrlenA]
and byte [ebp + 0xb], 0
push esi
call edi
cmp byte [eax + esi - 1], 0x5c
jne 0x40e5d2
push esi
call edi
and byte [eax + esi - 1], 0
mov byte [ebp + 0xb], 1
and dword [ebp - 0x14], 0
push esi
call edi
and dword [ebp - 0xc], 0
mov dword [ebp - 8], eax
mov edi, dword [ebp - 0x14]
cmp edi, dword [ebp - 8]
jge 0x40e5f4
cmp byte [edi + esi], 0x5c
je 0x40e5f1
inc edi
jmp 0x40e5e3
cmp edi, dword [ebp - 8]
jg 0x40e6cc
and byte [edi + esi], 0
add esi, dword [ebp - 0xc]
push esi
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
test eax, eax
jne 0x40e649
push eax
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
je 0x40e669
push esi
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
push ebx
push 0
push dword [ebp - 4]
call fcn.00425010
add esp, 0xc
push dword [ebp - 4]
push ebx
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
push 0x47f81c
mov ecx, 0x47f7f8
push dword [ebp - 4]
call fcn.0042276d
sub esi, dword [ebp - 0xc]
cmp edi, dword [ebp - 8]
lea eax, [edi + 1]
mov dword [ebp - 0xc], eax
jne 0x40e65d
cmp byte [ebp + 0xb], 0
je 0x40e661
mov byte [edi + esi], 0x5c
mov dword [ebp - 0x14], eax
jmp 0x40e5e0
cmp byte [ebp + 0xc], 0
jne 0x40e6c8
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [ebp - 0x20]
mov edi, eax
call fcn.0041c7ab
push esi
lea eax, [ebp - 0x20]
push str.Couldnt_create_directory__s.
push eax
call fcn.0041ce4d
add esp, 0xc
cmp edi, 5
jne 0x40e6a5
push 0
push str._Error:_Access_denied__You_may_not_have_required_privileges_for_installing_this_software._Please_have_your_system_administrator__or_other_user_with_higher_privileges__install_this_software.
lea ecx, [ebp - 0x20]
call fcn.0041ca2d
push 0
lea ecx, [ebp - 0x20]
call fcn.0041d704
push eax
mov ecx, 0x47f028
push dword [0x47f1e8]
call fcn.0041bc87
lea ecx, [ebp - 0x20]
call fcn.0041c8e1
xor bl, bl
jmp 0x40e6d7
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
mov bl, 1
push dword [ebp - 4]
call fcn.004258de
push dword [ebp - 0x10]
call fcn.004258de
pop ecx
mov al, bl
pop ecx
pop edi
pop ebx
jmp 0x40e6f1
xor al, al
pop esi
leave
ret