Function at 0x40d8f0
Capabilities:
Create directory
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x4054
call fcn.0041bb90
mov eax, dword [0x41e038]
xor eax, ebp
mov dword [ebp - 8], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x4048], eax
push ebx
mov eax, edi
push esi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40d917
sub eax, edx
sar eax, 1
cmp word [edi + eax*2 - 2], 0x2f
push 0
jne 0x40d949
push edi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov al, 1
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.0041b4f6
mov esp, ebp
pop ebp
ret
push 0x80
push 2
push 0
push 0
push 0x40000000
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x404c], eax
cmp eax, 0xffffffff
jne 0x40dba3
xor ecx, ecx
mov eax, edi
mov dword [ebp - 0x4030], 7
mov dword [ebp - 0x4034], 0
mov word [ebp - 0x4044], cx
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40d991
sub eax, edx
sar eax, 1
push eax
mov eax, edi
lea esi, [ebp - 0x4044]
call fcn.004088c0
push 1
push 0x40224c
xor edx, edx
mov ebx, esi
call fcn.00411f10
mov esi, eax
cmp esi, 0xffffffff
je 0x40da7b
xor edx, edx
push edx
lea eax, [ebp - 0x4044]
push eax
lea eax, [esi + 1]
lea ecx, [ebp - 0x4028]
mov dword [ebp - 0x4014], 7
mov dword [ebp - 0x4018], 0
mov word [ebp - 0x4028], dx
call fcn.00408480
mov eax, dword [ebp - 0x4028]
mov ebx, 8
cmp dword [ebp - 0x4014], ebx
jae 0x40da15
lea eax, [ebp - 0x4028]
push 0
push eax
call dword [sym.imp.MSVCR100.dll__waccess]
add esp, 8
cmp eax, 0xffffffff
jne 0x40da43
mov eax, dword [ebp - 0x4028]
cmp dword [ebp - 0x4014], ebx
jae 0x40da3a
lea eax, [ebp - 0x4028]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
cmp dword [ebp - 0x4014], ebx
jb 0x40da5b
mov ecx, dword [ebp - 0x4028]
push ecx
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
push 1
push 0x40224c
lea edx, [esi + 1]
lea ebx, [ebp - 0x4044]
call fcn.00411f10
mov esi, eax
cmp esi, 0xffffffff
jne 0x40d9c9
xor ebx, ebx
push ebx
push 0x80
push 2
push ebx
push ebx
push 0x40000000
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x404c], eax
cmp eax, 0xffffffff
jne 0x40db71
xor edx, edx
push 0x17
mov eax, 0x402380
lea esi, [ebp - 0x4028]
mov dword [ebp - 0x4014], 7
mov dword [ebp - 0x4018], ebx
mov word [ebp - 0x4028], dx
call fcn.004088c0
mov eax, edi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x40dad2
sub eax, edx
sar eax, 1
push eax
mov eax, edi
lea ecx, [ebp - 0x4028]
call fcn.00408790
mov eax, dword [ebp - 0x4028]
mov esi, 8
cmp dword [ebp - 0x4014], esi
jae 0x40db08
lea eax, [ebp - 0x4028]
push ebx
push 0x401968
push eax
push ebx
call dword [sym.imp.USER32.dll_MessageBoxW]
cmp dword [ebp - 0x4014], esi
jb 0x40db2e
mov eax, dword [ebp - 0x4028]
push eax
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
xor ecx, ecx
mov dword [ebp - 0x4014], 7
mov dword [ebp - 0x4018], ebx
mov word [ebp - 0x4028], cx
cmp dword [ebp - 0x4030], esi
jb 0x40db5f
mov edx, dword [ebp - 0x4044]
push edx
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
xor al, al
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.0041b4f6
mov esp, ebp
pop ebp
ret
cmp dword [ebp - 0x4030], 8
jb 0x40db8a
mov eax, dword [ebp - 0x4044]
push eax
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
xor ecx, ecx
mov dword [ebp - 0x4030], 7
mov dword [ebp - 0x4034], ebx
mov word [ebp - 0x4044], cx
mov edx, dword [ebp - 0x4048]
mov eax, dword [edx]
mov bl, 1
call fcn.004179b0
test eax, eax
je 0x40dc59
xor eax, eax
mov word [ebp - 0x4028], ax
push 0x24
mov eax, 0x4023b0
lea esi, [ebp - 0x4028]
mov dword [ebp - 0x4014], 7
mov dword [ebp - 0x4018], 0
call fcn.004088c0
mov eax, edi
lea edx, [eax + 2]
mov edi, edi
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40dbf0
sub eax, edx
sar eax, 1
push eax
mov eax, edi
lea ecx, [ebp - 0x4028]
call fcn.00408790
mov eax, dword [ebp - 0x4028]
mov esi, 8
cmp dword [ebp - 0x4014], esi
jae 0x40dc26
lea eax, [ebp - 0x4028]
push 0
push 0x401968
push eax
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
xor bl, bl
cmp dword [ebp - 0x4014], esi
jb 0x40ddc6
mov ecx, dword [ebp - 0x4028]
push ecx
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
jmp 0x40ddc6
mov esi, dword [sym.imp.KERNEL32.dll_WriteFile]
nop
mov eax, dword [ebp - 0x4048]
mov eax, dword [eax]
lea edx, [ebp - 0x400c]
push edx
call fcn.004179c0
test eax, eax
js 0x40dc9c
jle 0x40dd30
push 0
lea ecx, [ebp - 0x4050]
push ecx
push eax
mov eax, dword [ebp - 0x404c]
lea edx, [ebp - 0x400c]
push edx
push eax
call esi
test eax, eax
jne 0x40dc60
xor ecx, ecx
push 0x16
mov eax, 0x4023fc
lea esi, [ebp - 0x4028]
mov dword [ebp - 0x4014], 7
mov dword [ebp - 0x4018], 0
mov word [ebp - 0x4028], cx
call fcn.004088c0
mov eax, edi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40dcd0
sub eax, edx
sar eax, 1
push eax
mov eax, edi
lea ecx, [ebp - 0x4028]
call fcn.00408790
mov eax, dword [ebp - 0x4028]
mov esi, 8
cmp dword [ebp - 0x4014], esi
jae 0x40dd06
lea eax, [ebp - 0x4028]
push 0
push 0x401968
push eax
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
xor bl, bl
cmp dword [ebp - 0x4014], esi
jb 0x40dd30
mov edx, dword [ebp - 0x4028]
push edx
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
mov eax, dword [ebp - 0x4048]
mov ecx, dword [eax]
push ecx
call fcn.00417c40
cmp eax, 0xffffff97
jne 0x40ddc2
mov eax, 0x402430
lea ecx, [ebp - 0x4028]
call fcn.00408290
mov eax, edi
lea edx, [eax + 2]
lea esp, [esp]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40dd60
sub eax, edx
sar eax, 1
push eax
mov eax, edi
lea ecx, [ebp - 0x4028]
call fcn.00408790
mov eax, dword [ebp - 0x4028]
mov esi, 8
cmp dword [ebp - 0x4014], esi
jae 0x40dd96
lea eax, [ebp - 0x4028]
push 0
push 0x401968
push eax
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
xor bl, bl
cmp dword [ebp - 0x4014], esi
jb 0x40ddc6
mov edx, dword [ebp - 0x4028]
push edx
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
jmp 0x40ddc6
test bl, bl
jne 0x40ddd3
mov eax, dword [ebp - 0x4048]
mov esi, dword [eax]
call fcn.00416f90
mov ecx, dword [ebp - 0x404c]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 8]
pop esi
mov al, bl
xor ecx, ebp
pop ebx
call fcn.0041b4f6
mov esp, ebp
pop ebp
ret