Function at 0x40d06d
Capabilities:
Create directory
Set file attributes
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x50
mov dword [ebp - 0x50], ecx
mov dword [ebp - 8], 0
cmp dword [ebp + 0xc], 0
jne 0x40d29e
mov eax, dword [ebp - 0x50]
cmp dword [eax + 0x39c], 0
je 0x40d0ce
mov ecx, dword [ebp - 0x50]
add ecx, 0x23c
push ecx
push 0
push 0
mov edx, dword [ebp - 0x50]
mov eax, dword [edx + 0x39c]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileTime]
mov ecx, dword [ebp - 0x50]
mov edx, dword [ecx + 0x39c]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x50]
mov dword [eax + 0x39c], 0
mov ecx, dword [ebp + 8]
push ecx
mov ecx, dword [ebp - 0x50]
add ecx, 0x210
call fcn.0042554c
mov edx, dword [ebp + 8]
push edx
mov ecx, dword [ebp - 0x50]
add ecx, 0x214
call fcn.0042554c
mov eax, dword [ebp - 0x50]
mov ecx, dword [ebp + 0x1c]
mov dword [eax + 0x218], ecx
mov edx, dword [ebp - 0x50]
mov dword [edx + 0x220], 0
mov eax, dword [ebp - 0x50]
mov ecx, dword [ebp + 0x28]
mov dword [eax + 0x21c], ecx
mov edx, dword [ebp - 0x50]
mov eax, dword [ebp + 0x30]
mov dword [edx + 0x224], eax
mov ecx, dword [ebp - 0x50]
mov edx, dword [ebp + 0x2c]
mov dword [ecx + 0x228], edx
mov eax, dword [ebp - 0x50]
mov ecx, dword [eax + 0x224]
mov edx, dword [eax + 0x228]
mov eax, dword [ebp - 0x50]
mov dword [eax + 0x23c], ecx
mov dword [eax + 0x240], edx
mov ecx, dword [ebp + 0x1c]
and ecx, 0x10
test ecx, ecx
je 0x40d17f
push 0
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
jne 0x40d178
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x10]
jmp 0x40d3e0
xor eax, eax
jmp 0x40d3e0
cmp dword [ebp + 0x20], 0
je 0x40d19d
push 0x80
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
mov dword [ebp - 0x14], 2
jmp 0x40d1a4
mov dword [ebp - 0x14], 1
push 0x8001
call dword [sym.imp.KERNEL32.dll_SetErrorMode]
push 0
push 0x80
mov ecx, dword [ebp - 0x14]
push ecx
push 0
push 0
push 0x40000000
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ecx, dword [ebp - 0x50]
mov dword [ecx + 0x39c], eax
mov edx, dword [ebp - 0x50]
cmp dword [edx + 0x39c], 0xffffffff
jne 0x40d249
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp - 0x50]
mov dword [eax + 0x39c], 0
cmp dword [ebp + 0x24], 0
je 0x40d241
lea ecx, [ebp - 0x38]
push ecx
push 0
mov edx, dword [ebp + 8]
push edx
call fcn.00414331
add esp, 0xc
test eax, eax
je 0x40d241
mov eax, dword [ebp + 0x24]
mov ecx, dword [ebp - 0x38]
mov dword [eax + 0xc], ecx
mov edx, dword [ebp + 0x24]
mov eax, dword [ebp - 0x18]
mov dword [edx + 0x18], eax
mov ecx, dword [ebp + 0x24]
mov edx, dword [ebp - 0x1c]
mov dword [ecx + 0x1c], edx
mov eax, dword [ebp + 0x24]
mov ecx, dword [ebp - 0x20]
mov dword [eax + 0x24], ecx
mov edx, dword [ebp + 0x24]
mov eax, dword [ebp - 0x24]
mov dword [edx + 0x28], eax
mov eax, dword [ebp - 0x3c]
jmp 0x40d3e0
mov ecx, dword [ebp + 0x1c]
push ecx
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
cmp dword [ebp + 0x18], 0
jne 0x40d297
mov eax, dword [ebp - 0x50]
add eax, 0x23c
push eax
push 0
push 0
mov ecx, dword [ebp - 0x50]
mov edx, dword [ecx + 0x39c]
push edx
call dword [sym.imp.KERNEL32.dll_SetFileTime]
mov eax, dword [ebp - 0x50]
mov ecx, dword [eax + 0x39c]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [ebp - 0x50]
mov dword [edx + 0x39c], 0
xor eax, eax
jmp 0x40d3e0
mov eax, dword [ebp - 0x50]
mov ecx, dword [ebp + 0xc]
mov dword [eax + 0x39c], ecx
mov edx, dword [ebp + 0x14]
mov dword [ebp - 0xc], edx
cmp dword [ebp + 0x14], 0
je 0x40d30a
mov eax, dword [ebp + 0x28]
cmp eax, dword [ebp + 0x14]
jbe 0x40d30a
mov ecx, dword [ebp + 0x28]
add ecx, 0x400
push ecx
call sub.MFC42.DLL_operatornew
add esp, 4
mov dword [ebp - 0x44], eax
mov edx, dword [ebp - 0x44]
mov dword [ebp - 8], edx
mov eax, dword [ebp - 8]
push eax
mov ecx, dword [ebp + 0x28]
push ecx
mov edx, dword [ebp + 0x14]
push edx
mov eax, dword [ebp + 0x10]
push eax
call fcn.004247f0
add esp, 0x10
cmp dword [ebp + 0x28], eax
je 0x40d2fe
push 0
call dword [sym.imp.USER32.dll_MessageBeep]
mov ecx, dword [ebp + 0x28]
mov dword [ebp - 0xc], ecx
mov edx, dword [ebp - 8]
mov dword [ebp + 0x10], edx
push 0x8001
call dword [sym.imp.KERNEL32.dll_SetErrorMode]
push 0
lea eax, [ebp - 4]
push eax
mov ecx, dword [ebp - 0xc]
push ecx
mov edx, dword [ebp + 0x10]
push edx
mov eax, dword [ebp - 0x50]
mov ecx, dword [eax + 0x39c]
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40d343
cmp dword [ebp - 4], 0
jne 0x40d386
cmp dword [ebp + 0x14], 0
je 0x40d386
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x40], eax
mov edx, dword [ebp - 0x50]
mov eax, dword [edx + 0x39c]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0x50]
mov dword [ecx + 0x39c], 0
cmp dword [ebp - 8], 0
je 0x40d381
mov edx, dword [ebp - 8]
mov dword [ebp - 0x48], edx
mov eax, dword [ebp - 0x48]
push eax
call sub.MFC42.DLL_operatordelete
add esp, 4
mov eax, dword [ebp - 0x40]
jmp 0x40d3e0
cmp dword [ebp - 8], 0
je 0x40d39e
mov ecx, dword [ebp - 8]
mov dword [ebp - 0x4c], ecx
mov edx, dword [ebp - 0x4c]
push edx
call sub.MFC42.DLL_operatordelete
add esp, 4
cmp dword [ebp + 0x18], 0
jne 0x40d3de
mov eax, dword [ebp - 0x50]
add eax, 0x23c
push eax
push 0
push 0
mov ecx, dword [ebp - 0x50]
mov edx, dword [ecx + 0x39c]
push edx
call dword [sym.imp.KERNEL32.dll_SetFileTime]
mov eax, dword [ebp - 0x50]
mov ecx, dword [eax + 0x39c]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [ebp - 0x50]
mov dword [edx + 0x39c], 0
xor eax, eax
mov esp, ebp
pop ebp
ret 0x2c