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

Disassembly:
sub esp, 0x528
mov eax, dword [0x42d2ec]
xor eax, esp
mov dword [esp + 0x524], eax
push esi
mov esi, dword [esp + 0x530]
test esi, esi
push edi
mov edi, dword [esp + 0x538]
je 0x40de73
test edi, edi
je 0x40de73
cmp byte [esi], 0
je 0x40de73
push edi
push esi
push str.InCreateDirectory_Start_n__lpszFullPath_:__s_n__lpszBaseFolderPath___s_n
call fcn.00406d20
push esi
lea eax, [esp + 0x28]
push 0x104
push eax
call fcn.00413690
lea ecx, [esp + 0x30]
push ecx
call fcn.0040ea30
push edi
lea edx, [esp + 0x240]
push 0x104
push edx
call fcn.00413690
lea eax, [esp + 0x248]
push eax
call fcn.0040ea30
add esp, 0x2c
cmp byte [esp + 0x220], 0
je 0x40de8c
lea ecx, [esp + 0x220]
push ecx
lea edx, [esp + 0x1c]
push edx
call fcn.0040d8e0
add esp, 8
test eax, eax
je 0x40de8c
lea eax, [esp + 0x220]
push eax
lea ecx, [esp + 0x1c]
push ecx
push str.InCreateDirectory_FAILED_n__szFullPath_:__s_n__szBasePath___s_n
call fcn.00406d20
add esp, 0xc
pop edi
xor eax, eax
pop esi
mov ecx, dword [esp + 0x524]
xor ecx, esp
call fcn.00412c09
add esp, 0x528
ret
lea edx, [esp + 0x428]
push edx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
push 0x104
lea eax, [esp + 0x120]
push 0
push eax
call fcn.00412dc0
mov al, byte [esp + 0x25]
add esp, 0xc
cmp al, 0x3a
lea edi, [esp + 0x18]
lea esi, [esp + 0x11c]
jne 0x40df02
cmp byte [esp + 0x1a], 0x5c
mov cl, byte [esp + 0x18]
mov byte [esp + 0x11c], cl
mov byte [esp + 0x11d], al
lea esi, [esp + 0x11e]
lea edi, [esp + 0x1a]
jne 0x40df32
mov byte [esp + 0x11e], 0x5c
lea esi, [esp + 0x11f]
lea edi, [esp + 0x1b]
jmp 0x40df32
cmp byte [esp + 0x18], 0x5c
jne 0x40df32
cmp al, 0x5c
mov byte [esp + 0x11c], 0x5c
lea esi, [esp + 0x11d]
lea edi, [esp + 0x19]
jne 0x40df32
mov byte [esp + 0x11d], al
lea esi, [esp + 0x11e]
lea edi, [esp + 0x1a]
lea edx, [esp + 0x18]
push edx
mov byte [esp + 0xf], 0
call dword [sym.imp.KERNEL32.dll_lstrlenA]
cmp eax, 3
jle 0x40df5a
cmp byte [esp + 0x18], 0x5c
jne 0x40df5a
cmp byte [esp + 0x19], 0x5c
jne 0x40df5a
mov byte [esp + 0xb], 1
push ebx
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
cmp byte [edi], 0x5c
jne 0x40df79
lea eax, [esp + 0x20]
push edi
push eax
call fcn.0040f5f0
add esp, 8
test eax, eax
je 0x40df83
mov al, byte [edi]
test al, al
jne 0x40e06b
cmp byte [esp + 0x13], 0
je 0x40dfa3
mov al, byte [edi]
test al, al
je 0x40e078
mov byte [esi], al
add esi, 1
add edi, 1
mov byte [esp + 0x13], 0
jmp 0x40df62
xor eax, eax
lea ecx, [esp + 0x14]
push ecx
lea edx, [esp + 0x128]
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], eax
push edx
mov byte [esi], 0
mov dword [esp + 0x1c], 0xc
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], 1
xor bl, bl
call ebp
test eax, eax
je 0x40dfdf
mov bl, 1
lea eax, [esp + 0x124]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
mov esi, eax
test esi, esi
je 0x40e07a
cmp byte [esp + 0x228], 0
je 0x40e051
lea ecx, [esp + 0x32c]
push ecx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
lea edx, [esp + 0x32c]
push edx
call fcn.0040ea30
add esp, 4
test bl, bl
jne 0x40e034
test dword [0x42f638], 0x400
je 0x40e051
lea eax, [esp + 0x32c]
push eax
call fcn.0040e9f0
lea ecx, [esp + 0x330]
push ecx
call fcn.00405d10
add esp, 8
cmp byte [edi], 0
je 0x40e07a
cmp byte [edi + 1], 0
je 0x40e07a
add edi, 1
lea esi, [esp + 0x124]
jmp 0x40df62
mov byte [esi], al
add esi, 1
add edi, 1
jmp 0x40df62
xor esi, esi
lea edx, [esp + 0x430]
push edx
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
test esi, esi
pop ebp
pop ebx
je 0x40e09f
push 0
lea eax, [esp + 0x1c]
push eax
push 1
push 8
call dword [sym.imp.SHELL32.dll_SHChangeNotify]
mov ecx, dword [esp + 0x52c]
pop edi
mov eax, esi
pop esi
xor ecx, esp
call fcn.00412c09
add esp, 0x528
ret