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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
test esi, esi
je 0x40d8af
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
test eax, eax
je 0x40d8af
mov edi, 0x104
push edi
call fcn.0042200e
test eax, eax
pop ecx
mov dword [ebp - 4], eax
jne 0x40d6bb
mov ecx, 0x47a7fc
call fcn.0041ab9e
push eax
call fcn.0041b6d2
pop ecx
push edi
call fcn.0042200e
mov ebx, eax
pop ecx
test ebx, ebx
mov dword [ebp - 0x10], ebx
jne 0x40d6dc
mov ecx, 0x47a7fc
call fcn.0041ab9e
push eax
call fcn.0041b6d2
pop ecx
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
mov al, byte [esi + 1]
cmp al, 0x3a
jne 0x40d711
cmp byte [esi + 2], 0x5c
jne 0x40d711
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 0x40d76d
cmp byte [esi], 0x5c
jne 0x40d88a
cmp al, 0x5c
jne 0x40d88a
lea eax, [esi + 2]
push 0x5c
push eax
call fcn.00421af0
pop ecx
test eax, eax
pop ecx
je 0x40d75d
inc eax
push 0x5c
push eax
call fcn.00421af0
mov ebx, eax
pop ecx
test ebx, ebx
pop ecx
jne 0x40d74b
mov al, 1
jmp 0x40d8b1
and byte [ebx], 0
push esi
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
mov byte [ebx], 0x5c
lea esi, [ebx + 1]
jmp 0x40d76d
push dword [ebp - 4]
call fcn.0042201c
push ebx
call fcn.0042201c
pop ecx
pop ecx
push dword [ebp - 4]
push edi
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
mov ebx, dword [sym.imp.KERNEL32.dll_lstrlenA]
and byte [ebp + 0xb], 0
push esi
call ebx
cmp byte [eax + esi - 1], 0x5c
jne 0x40d797
push esi
call ebx
and byte [eax + esi - 1], 0
mov byte [ebp + 0xb], 1
push esi
xor ebx, ebx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
and dword [ebp - 0xc], ebx
mov dword [ebp - 8], eax
cmp ebx, dword [ebp - 8]
jge 0x40d7b7
cmp byte [ebx + esi], 0x5c
je 0x40d7b4
inc ebx
jmp 0x40d7a6
cmp ebx, dword [ebp - 8]
jg 0x40d88e
and byte [ebx + esi], 0
add esi, dword [ebp - 0xc]
push esi
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
test eax, eax
jne 0x40d80c
push eax
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
je 0x40d82b
push esi
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
push edi
push 0
push dword [ebp - 4]
call fcn.00421740
add esp, 0xc
push dword [ebp - 4]
push edi
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
push 0x47a684
mov ecx, 0x47a660
push dword [ebp - 4]
call fcn.0041f0bc
sub esi, dword [ebp - 0xc]
cmp ebx, dword [ebp - 8]
lea eax, [ebx + 1]
mov dword [ebp - 0xc], eax
jne 0x40d820
cmp byte [ebp + 0xb], 0
je 0x40d824
mov byte [ebx + esi], 0x5c
mov ebx, eax
jmp 0x40d7a6
cmp byte [ebp + 0xc], 0
jne 0x40d88a
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [ebp - 0x1c]
mov edi, eax
call fcn.00419c64
push esi
lea eax, [ebp - 0x1c]
push str.Couldnt_create_directory__s.
push eax
call fcn.0041a30f
add esp, 0xc
cmp edi, 5
jne 0x40d867
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 - 0x1c]
call fcn.00419ee6
push 0
lea ecx, [ebp - 0x1c]
call fcn.0041ab9e
push eax
mov ecx, 0x479ee8
push dword [0x47a0a0]
call fcn.0041916b
lea ecx, [ebp - 0x1c]
call fcn.00419d9a
xor bl, bl
jmp 0x40d899
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
mov bl, 1
push dword [ebp - 4]
call fcn.0042201c
push dword [ebp - 0x10]
call fcn.0042201c
pop ecx
mov al, bl
pop ecx
jmp 0x40d8b1
xor al, al
pop edi
pop esi
pop ebx
leave
ret