Function at 0x4035f0
Capabilities:
Create directory
Get file size
Print debug messages
Write file on windows

Disassembly:
mov eax, 0x8250
call fcn.00403bd0
push ebp
push esi
push edi
push 0x410400
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
lea eax, [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
mov esi, dword [0x4102e8]
test esi, esi
jne 0x40372d
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x21]
mov byte [esp + 0x20], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x125]
mov byte [esp + 0x124], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea ecx, [esp + 0x124]
push 0x104
push ecx
push esi
stosb byte es:[edi], al
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea edx, [esp + 0x124]
push 0x5c
push edx
call dword [sym.imp.MSVCRT.dll_strrchr]
mov byte [eax + 1], 0
lea edi, [esp + 0x12c]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x28]
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x28]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, str.Log_
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebp, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebp
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
lea eax, [esp + 0x28]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.MSVCRT.dll__mkdir]
mov edi, 0x4102fc
or ecx, 0xffffffff
xor eax, eax
add esp, 0xc
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x20]
mov esi, edi
mov ebp, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebp
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
and ecx, 3
rep movsb byte es:[edi], byte [esi]
push eax
push 0x80
push 4
push eax
push 3
lea eax, [esp + 0x34]
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [0x4102e8], eax
mov esi, eax
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [esp + 0xc], eax
fild dword [esp + 0xc]
fcomp qword [0x409a00]
fnstsw ax
test ah, 1
je 0x40375a
push 2
push 0
push 0
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
jmp 0x40376e
push 0
push 0
push 0
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push esi
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test esi, esi
je 0x40383e
mov ecx, dword [esp + 0x1a]
mov edx, dword [esp + 0x18]
mov eax, dword [esp + 0x16]
and ecx, 0xffff
mov ebp, dword [sym.imp.MSVCRT.dll_sprintf]
push ecx
mov ecx, dword [esp + 0x16]
and edx, 0xffff
and eax, 0xffff
push edx
and ecx, 0xffff
push eax
push ecx
lea edx, [esp + 0x238]
push str._02d__02d__02d:_02d
push edx
call ebp
mov ecx, dword [esp + 0x8278]
mov edi, eax
lea eax, [esp + 0x827c]
push eax
push ecx
lea edx, [esp + edi + 0x248]
push 0x8000
push edx
call dword [sym.imp.MSVCRT.dll__vsnprintf]
add edi, eax
add esp, 0x28
lea eax, [esp + edi + 0x228]
push 0x40b900
push eax
call ebp
add esp, 8
lea ecx, [esp + 0xc]
lea edi, [esp + 0x228]
xor eax, eax
push 0
push ecx
or ecx, 0xffffffff
lea edx, [esp + 0x230]
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push edx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
lea eax, [esp + 0x228]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
lea ecx, [esp + 0x228]
push ecx
push 0x40b8fc
call dword [sym.imp.MSVCRT.dll_printf]
add esp, 8
push 0x410400
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop edi
pop esi
pop ebp
add esp, 0x8250
ret