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

Disassembly:
sub esp, 0x528
mov eax, dword [0x42c2e4]
xor eax, esp
mov dword [esp + 0x524], eax
mov eax, dword [esp + 0x52c]
test eax, eax
push esi
mov esi, dword [esp + 0x534]
je 0x40d46e
test esi, esi
je 0x40d46e
cmp byte [eax], 0
je 0x40d46e
push eax
lea eax, [esp + 0x18]
push 0x104
push eax
call fcn.004128b7
lea ecx, [esp + 0x20]
push ecx
call fcn.0040e0a0
push esi
lea edx, [esp + 0x230]
push 0x104
push edx
call fcn.004128b7
lea eax, [esp + 0x238]
push eax
call fcn.0040e0a0
add esp, 0x20
cmp byte [esp + 0x21c], 0
je 0x40d486
lea ecx, [esp + 0x21c]
push ecx
lea edx, [esp + 0x18]
push edx
call fcn.0040cef0
add esp, 8
test eax, eax
je 0x40d486
lea eax, [esp + 0x21c]
push eax
lea ecx, [esp + 0x18]
push ecx
push str.InCreateDirectory_FAILED_n__szFullPath_:__s_n__szBasePath___s_n
call fcn.00406800
add esp, 0xc
xor eax, eax
pop esi
mov ecx, dword [esp + 0x524]
xor ecx, esp
call fcn.004121f9
add esp, 0x528
ret
push ebx
push edi
lea edx, [esp + 0x42c]
push edx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
push 0x104
lea eax, [esp + 0x124]
push 0
push eax
call fcn.00412210
mov al, byte [esp + 0x29]
add esp, 0xc
cmp al, 0x3a
lea edi, [esp + 0x1c]
lea esi, [esp + 0x120]
jne 0x40d4fe
cmp byte [esp + 0x1e], 0x5c
mov cl, byte [esp + 0x1c]
mov byte [esp + 0x120], cl
mov byte [esp + 0x121], al
lea esi, [esp + 0x122]
lea edi, [esp + 0x1e]
jne 0x40d52e
mov byte [esp + 0x122], 0x5c
lea esi, [esp + 0x123]
lea edi, [esp + 0x1f]
jmp 0x40d52e
cmp byte [esp + 0x1c], 0x5c
jne 0x40d52e
cmp al, 0x5c
mov byte [esp + 0x120], 0x5c
lea esi, [esp + 0x121]
lea edi, [esp + 0x1d]
jne 0x40d52e
mov byte [esp + 0x121], al
lea esi, [esp + 0x122]
lea edi, [esp + 0x1e]
lea edx, [esp + 0x1c]
push edx
mov byte [esp + 0x13], 0
call dword [sym.imp.KERNEL32.dll_lstrlenA]
cmp eax, 3
jle 0x40d556
cmp byte [esp + 0x1c], 0x5c
jne 0x40d556
cmp byte [esp + 0x1d], 0x5c
jne 0x40d556
mov byte [esp + 0xf], 1
cmp byte [edi], 0x5c
jne 0x40d56d
lea eax, [esp + 0x1c]
push edi
push eax
call fcn.0040ec60
add esp, 8
test eax, eax
je 0x40d577
mov al, byte [edi]
test al, al
jne 0x40d6cd
cmp byte [esp + 0xf], 0
je 0x40d597
mov al, byte [edi]
test al, al
je 0x40d6da
mov byte [esi], al
add esi, 1
add edi, 1
mov byte [esp + 0xf], 0
jmp 0x40d556
xor eax, eax
lea ecx, [esp + 0x10]
push ecx
lea edx, [esp + 0x124]
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], eax
push edx
mov byte [esi], 0
mov dword [esp + 0x18], 0xc
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], 1
xor bl, bl
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
je 0x40d5d7
mov bl, 1
lea eax, [esp + 0x120]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
mov esi, eax
test esi, esi
je 0x40d6dc
cmp byte [esp + 0x224], 0
je 0x40d6b3
lea ecx, [esp + 0x328]
push ecx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
lea edx, [esp + 0x328]
push edx
call fcn.0040e0a0
lea eax, [esp + 0x228]
add esp, 4
lea edx, [eax + 1]
lea ebx, [ebx]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x40d630
sub eax, edx
push eax
lea eax, [esp + 0x228]
push eax
lea ecx, [esp + 0x330]
push ecx
call fcn.00413b47
add esp, 0xc
test eax, eax
jne 0x40d6b3
lea eax, [esp + 0x224]
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x40d662
sub eax, edx
cmp byte [esp + eax + 0x328], 0x5c
lea eax, [esp + eax + 0x328]
jne 0x40d6b3
cmp byte [eax + 1], cl
je 0x40d6b3
lea edx, [esp + 0x328]
push edx
call fcn.0040e060
add esp, 4
test bl, bl
jne 0x40d6a3
test dword [0x42e5f8], 0x400
je 0x40d6b3
lea eax, [esp + 0x328]
push eax
call fcn.004058d0
add esp, 4
cmp byte [edi], 0
je 0x40d6dc
cmp byte [edi + 1], 0
je 0x40d6dc
add edi, 1
lea esi, [esp + 0x120]
jmp 0x40d556
mov byte [esi], al
add esi, 1
add edi, 1
jmp 0x40d556
xor esi, esi
lea ecx, [esp + 0x42c]
push ecx
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
test esi, esi
pop edi
pop ebx
je 0x40d701
push 0
lea edx, [esp + 0x18]
push edx
push 1
push 8
call dword [sym.imp.SHELL32.dll_SHChangeNotify]
mov ecx, dword [esp + 0x528]
mov eax, esi
pop esi
xor ecx, esp
call fcn.004121f9
add esp, 0x528
ret