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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4178e8
mov eax, dword fs:[0]
push eax
sub esp, 0xc
mov eax, dword [0x42000c]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 4], 0
mov eax, dword [0x4215c4]
cmp dword [eax - 0xc], 0
jle 0x4019a7
mov esi, dword [0x4215bc]
push ecx
mov ebx, esp
mov dword [ebp - 0x18], ebx
mov ecx, dword [esi - 0x10]
mov eax, dword [ecx]
call dword [eax + 0x10]
cmp dword [esi - 4], 0
mov ecx, eax
lea eax, [esi - 4]
jl 0x40177d
cmp ecx, dword [esi - 0x10]
jne 0x40177d
lea edi, [esi - 0x10]
lock inc dword [eax]
jmp 0x4017a7
mov eax, dword [ecx]
push 1
push dword [esi - 0xc]
call dword [eax]
mov edi, eax
test edi, edi
je 0x4019ec
mov eax, dword [esi - 0xc]
lea ecx, [edi + 0x10]
mov dword [edi + 4], eax
mov edx, dword [esi - 0xc]
inc edx
push edx
push esi
call fcn.00404370
add esp, 8
lea eax, [edi + 0x10]
mov dword [ebx], eax
call fcn.00401a00
mov ebx, dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
add esp, 4
test eax, eax
jne 0x4017c8
push 0
push dword [0x4215bc]
call ebx
mov esi, dword [0x4215c0]
push ecx
mov dword [ebp - 0x18], esp
mov ecx, dword [esi - 0x10]
mov eax, dword [ecx]
call dword [eax + 0x10]
cmp dword [esi - 4], 0
mov ecx, eax
lea eax, [esi - 4]
jl 0x4017f2
cmp ecx, dword [esi - 0x10]
jne 0x4017f2
lea edi, [esi - 0x10]
lock inc dword [eax]
jmp 0x40181c
mov eax, dword [ecx]
push 1
push dword [esi - 0xc]
call dword [eax]
mov edi, eax
test edi, edi
je 0x4019f1
mov eax, dword [esi - 0xc]
lea ecx, [edi + 0x10]
mov dword [edi + 4], eax
mov edx, dword [esi - 0xc]
inc edx
push edx
push esi
call fcn.00404370
add esp, 8
mov ecx, dword [ebp - 0x18]
lea eax, [edi + 0x10]
mov dword [ecx], eax
call fcn.00401a00
add esp, 4
test eax, eax
jne 0x401839
push eax
push dword [0x4215c0]
call ebx
mov edi, dword [sym.imp.KERNEL32.dll_CreateFileA]
push 0
push 0x80
push 4
push 0
push 1
push 4
push dword [0x4215c4]
call edi
mov esi, eax
cmp esi, 0xffffffff
jne 0x401878
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.CreateFile_failed_w_err_0x_08lx_n
call fcn.004049b0
add esp, 8
xor edi, edi
jmp 0x4019ac
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp eax, 0x500000
jbe 0x4018f5
push esi
call ebx
push dword [0x4215c4]
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
jne 0x4018bc
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.DeleteFile_failed_w_err_0x_08lx_n
call fcn.004049b0
add esp, 8
xor edi, edi
jmp 0x4019ac
push 0
push 0x80
push 4
push 0
push 1
push 4
push dword [0x4215c4]
call edi
mov esi, eax
cmp esi, 0xffffffff
jne 0x4018f5
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.CreateFile_failed_w_err_0x_08lx_n
call fcn.004049b0
add esp, 8
xor edi, edi
jmp 0x4019ac
push 0x4215ac
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
push dword [ebp + 8]
movzx eax, word [0x4215ba]
push eax
movzx eax, word [0x4215b8]
push eax
movzx eax, word [0x4215b6]
push eax
movzx eax, word [0x4215b4]
push eax
movzx eax, word [0x4215b2]
push eax
movzx eax, word [0x4215ae]
push eax
movzx eax, word [0x4215ac]
push eax
push str._4d__02d__02d__02d:_02d:_02d._03d_t_t_s_r_n
push 0x4215c8
call fcn.00404560
mov eax, dword [0x4215c8]
lea ecx, [ebp - 0x14]
add esp, 0x28
mov edi, dword [eax - 0xc]
push 0
push ecx
push edi
push eax
push esi
mov dword [ebp - 0x14], 0
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x401987
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.WriteFile_failed_w_err_0x_08lx_n
call fcn.004049b0
add esp, 8
xor edi, edi
jmp 0x4019ac
cmp dword [ebp - 0x14], edi
je 0x4019a4
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.WriteFile_Len_failed_w_err_0x_08lx_n
call fcn.004049b0
add esp, 8
xor edi, edi
jmp 0x4019ac
push esi
call ebx
mov edi, 1
mov dword [ebp - 4], 0xffffffff
or eax, 0xffffffff
mov esi, dword [ebp + 8]
add esi, 0xfffffff0
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x4019ce
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00404b3d
mov esp, ebp
pop ebp
ret
call fcn.00404160
call fcn.00404160
int3