Function at 0x403ea0
Capabilities:
Create directory
Get file size
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x210
and byte [ebp - 0x10c], 0
push ebx
push esi
push edi
push 0x40
xor eax, eax
pop ecx
lea edi, [ebp - 0x10b]
rep stosd dword es:[edi], eax
and byte [ebp - 0x210], 0
push 0x40
stosw word es:[edi], ax
stosb byte es:[edi], al
pop ecx
xor eax, eax
lea edi, [ebp - 0x20f]
xor esi, esi
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov eax, dword [ebp + 8]
mov dword [ebp - 4], esi
cmp eax, esi
mov dword [ebp - 8], esi
je 0x4040d3
cmp byte [eax], 0
je 0x4040d3
lea ecx, [ebp - 0x10c]
push ecx
push eax
call fcn.004041b8
lea eax, [ebp - 0x10c]
pop ecx
test eax, eax
pop ecx
je 0x403f2f
cmp byte [ebp - 0x10c], 0
je 0x403f2f
lea eax, [ebp - 0x10c]
push eax
call fcn.004043d7
movsx eax, byte [ebp + eax - 0x10d]
pop ecx
jmp 0x403f31
xor eax, eax
cmp eax, 0x5c
jne 0x403f9b
xor edi, edi
cmp byte [ebp - 0x10c], 0
je 0x40410c
cmp edi, 0x104
jge 0x40410c
cmp byte [ebp + edi - 0x10c], 0x5c
lea ebx, [ebp + edi - 0x10c]
jne 0x403f82
cmp edi, 1
jle 0x403f82
cmp byte [ebp + edi - 0x10d], 0x3a
je 0x403f82
lea eax, [ebp - 0x210]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
mov dword [ebp - 4], eax
mov al, byte [ebx]
mov byte [ebp + edi - 0x210], al
inc edi
cmp byte [ebp + edi - 0x10c], 0
jne 0x403f45
jmp 0x40410c
mov ebx, 0x80
push esi
push ebx
push 4
push esi
mov esi, dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, 0xc0000000
push 3
lea eax, [ebp - 0x10c]
push edi
push eax
call esi
cmp eax, 0xffffffff
mov dword [ebp + 8], eax
je 0x403fcc
test eax, eax
jne 0x404069
lea eax, [ebp - 0x10c]
push eax
call fcn.00403b09
test eax, eax
pop ecx
jne 0x404069
lea eax, [ebp - 0x10c]
push 0x5c
push eax
call fcn.00404525
pop ecx
test eax, eax
pop ecx
je 0x404069
xor eax, eax
cmp byte [ebp - 0x10c], al
mov dword [ebp + 8], eax
je 0x404053
cmp eax, 0x104
jge 0x404053
cmp byte [ebp + eax - 0x10c], 0x5c
jne 0x404037
cmp eax, 1
jle 0x404037
cmp byte [ebp + eax - 0x10d], 0x3a
je 0x404037
lea eax, [ebp - 0x210]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
mov cl, byte [ebp + eax - 0x10c]
mov byte [ebp + eax - 0x210], cl
inc eax
mov dword [ebp + 8], eax
cmp byte [ebp + eax - 0x10c], 0
jne 0x404002
push 0
push ebx
push 4
push 0
push 3
lea eax, [ebp - 0x10c]
push edi
push eax
call esi
mov dword [ebp + 8], eax
cmp dword [ebp + 8], 0xffffffff
je 0x40410c
cmp dword [ebp + 8], 0
je 0x40410c
cmp dword [ebp + 0x10], 0
je 0x4040fc
mov esi, dword [ebp + 0x14]
test esi, esi
je 0x4040fc
mov eax, dword [ebp + 0x18]
mov ecx, dword [ebp + 0x1c]
mov edx, eax
or edx, ecx
je 0x4040a0
mov edx, ecx
mov dword [ebp - 8], ecx
sar edx, 0x1f
jmp 0x4040b5
mov eax, dword [ebp + 0xc]
cmp eax, 0xffffffff
jne 0x4040b5
lea eax, [ebp - 8]
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetFileSize]
lea ecx, [ebp - 8]
push 0
push ecx
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x4040da
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
lea eax, [ebp - 4]
push 0
push eax
push esi
push dword [ebp + 0x10]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4040f6
cmp dword [ebp - 4], esi
je 0x404103
and dword [ebp - 4], 0
jmp 0x404103
mov dword [ebp - 4], 1
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 4]
jmp 0x4040d5