Function at 0x40cd10
Capabilities:
Create directory
Print debug messages

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x8e8
mov eax, dword [0x467e60]
xor eax, ebp
mov dword [ebp - 8], eax
mov eax, dword [ebp + 8]
push ebx
mov dword [ebp - 0x8bc], eax
mov eax, dword [ebp + 0xc]
push esi
mov dword [ebp - 0x8d4], eax
mov eax, dword [ebp + 0x10]
push edi
mov dword [ebp - 0x8c8], eax
xor eax, eax
push 0x7e
push eax
mov word [ebp - 0x8c], ax
lea eax, [ebp - 0x8a]
mov edi, edx
xor ebx, ebx
push eax
mov dword [ebp - 0x8b8], edi
mov dword [ebp - 0x8cc], ecx
mov dword [ebp - 0x8d8], 0xffffffff
mov dword [ebp - 0x8b0], ebx
mov dword [ebp - 0x8e0], ebx
call fcn.0043f3e0
add esp, 0xc
push dword [edi + 0x18]
lea eax, [ebp - 0x8c]
push 0x461198
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
lea eax, [ebp - 0x8c]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
xor eax, eax
xorps xmm0, xmm0
movlpd qword [0x46bc20], xmm0
mov dword [ebp - 0x8c4], eax
cmp dword [edi + 0x18], eax
jbe 0x40d083
xor ecx, ecx
mov dword [ebp - 0x8c0], ecx
jmp 0x40cdd0
push dword [ebp - 0x8d4]
mov esi, dword [edi + 0x1c]
push dword [ebp - 0x8bc]
add esi, ecx
lea ecx, [ebp - 0x8dc]
push ecx
lea ecx, [ebp - 0x8e4]
push ecx
lea ecx, [ebp - 0x8e0]
push ecx
lea ecx, [ebp - 0x8b0]
push ecx
lea ecx, [ebp - 0x8d8]
push ecx
mov ecx, dword [ebp - 0x8cc]
push eax
mov edx, edi
mov ebx, 0x5c
mov dword [ebp - 0x8d0], esi
call fcn.00409c60
add esp, 0x20
mov dword [ebp - 0x8b4], eax
test eax, eax
jne 0x40d075
push 0x206
push eax
mov word [ebp - 0x6a4], ax
lea eax, [ebp - 0x6a2]
push eax
call fcn.0043f3e0
add esp, 0xc
xor eax, eax
push 0x206
push eax
mov word [ebp - 0x8ac], ax
lea eax, [ebp - 0x8aa]
push eax
call fcn.0043f3e0
add esp, 0xc
xor eax, eax
push 0x206
push eax
mov word [ebp - 0x294], ax
lea eax, [ebp - 0x292]
push eax
call fcn.0043f3e0
add esp, 0xc
xor eax, eax
push 0x206
push eax
mov word [ebp - 0x49c], ax
lea eax, [ebp - 0x49a]
push eax
call fcn.0043f3e0
mov edx, dword [esi + 0x14]
mov ecx, edx
add esp, 0xc
lea edi, [ecx + 1]
lea esp, [esp]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40ceb0
push 0xff
lea eax, [ebp - 0x6a4]
push eax
sub ecx, edi
push ecx
push edx
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
lea eax, [ebp - 0x6a4]
push eax
push 0x460610
push dword [ebp - 0x8c8]
lea eax, [ebp - 0x8ac]
push str._s_s_s
push 0x208
push 0x104
push eax
call fcn.0043eda1
add esp, 0x1c
lea eax, [ebp - 0x8ac]
push eax
lea eax, [ebp - 0x294]
push eax
call dword [sym.imp.SHLWAPI.dll_PathCanonicalizeW]
lea eax, [ebp - 0x294]
xor edx, edx
lea edi, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40cf23
sub eax, edi
sar eax, 1
js 0x40cf4c
cmp word [ebp + edx*2 - 0x294], 0x2f
jne 0x40cf47
mov word [ebp + edx*2 - 0x294], bx
inc edx
cmp edx, eax
jle 0x40cf34
cmp byte [esi + 0x1a], 0
mov ebx, dword [ebp - 0x8b0]
lea ecx, [ebp - 0x294]
je 0x40cf68
call fcn.0040ca40
jmp 0x40cfec
lea edx, [ebp - 0x49c]
call fcn.0040c9c0
lea ecx, [ebp - 0x49c]
call fcn.0040ca40
push 0
lea eax, [ebp - 0x49c]
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHCreateDirectoryExW]
push 0
push 0x80
push 2
push 0
push 1
push 0x40000000
lea eax, [ebp - 0x294]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
je 0x40d042
mov edx, dword [ebp - 0x8e4]
mov esi, dword [ebp - 0x8dc]
push esi
lea edx, [edx + ebx]
mov ecx, edi
call fcn.0040c8a0
add esp, 4
push edi
cmp eax, esi
je 0x40cfe0
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x40d042
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [ebp - 0x8d0]
mov ecx, dword [0x46ac10]
test ecx, ecx
je 0x40d007
movzx eax, byte [esi + 0x1a]
push eax
lea eax, [ebp - 0x294]
push eax
call ecx
add esp, 8
mov eax, dword [0x46bc20]
add eax, dword [esi + 8]
mov ecx, dword [0x46bc24]
adc ecx, dword [esi + 0xc]
mov edx, dword [0x46ac04]
mov dword [0x46bc20], eax
mov dword [0x46bc24], ecx
test edx, edx
je 0x40d042
push 0
push ecx
push eax
push dword [0x46ac0c]
push dword [0x46ac08]
call edx
add esp, 0x14
mov eax, dword [ebp - 0x8c4]
mov ecx, dword [ebp - 0x8c0]
mov edi, dword [ebp - 0x8b8]
inc eax
add ecx, 0x20
mov dword [ebp - 0x8c4], eax
mov dword [ebp - 0x8c0], ecx
cmp eax, dword [edi + 0x18]
jb 0x40cdd0
mov esi, dword [ebp - 0x8b4]
jmp 0x40d089
mov ebx, dword [ebp - 0x8b0]
mov esi, dword [ebp - 0x8b4]
jmp 0x40d089
mov esi, dword [ebp - 0x8b8]
mov eax, dword [ebp - 0x8bc]
push ebx
mov eax, dword [eax + 4]
call eax
mov ecx, dword [ebp - 8]
add esp, 4
mov eax, esi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0043cefb
mov esp, ebp
pop ebp
ret