Function at 0x401fa0
Capabilities:
Get file size
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x222c
call fcn.0055ece0
mov eax, dword [0x5ef220]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
xor eax, eax
xorps xmm0, xmm0
push esi
mov esi, dword [ebp + 8]
mov word [ebp - 0x2220], ax
mov dword [ebp - 0x2216], eax
mov word [ebp - 0x2212], ax
lea eax, [ebp - 0x2220]
push edi
push eax
movq qword [ebp - 0x221e], xmm0
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
mov ax, word [ebp - 0x2220]
mov di, word [ebp - 0x221a]
mov bx, word [ebp - 0x221e]
cmp ax, word [esi + 0x420]
jne 0x40201b
cmp bx, word [esi + 0x422]
jne 0x40201b
cmp di, word [esi + 0x426]
je 0x40204f
mov eax, dword [esi + 4]
cmp eax, 0xffffffff
je 0x40203f
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov di, word [ebp - 0x221a]
mov bx, word [ebp - 0x221e]
mov dword [esi + 4], 0xffffffff
movdqu xmm0, xmmword [ebp - 0x2220]
movdqu xmmword [esi + 0x420], xmm0
cmp dword [esi + 4], 0xffffffff
jne 0x40210d
xor eax, eax
push 0x206
push eax
mov word [ebp - 0x210], ax
lea eax, [ebp - 0x20e]
push eax
call fcn.0055c960
movzx eax, di
push eax
movzx eax, bx
push eax
movzx eax, word [ebp - 0x2220]
push eax
lea eax, [esi + 0x10]
push eax
lea eax, [esi + 0x218]
push eax
lea eax, [ebp - 0x210]
push str._s_s__04d_02d_02d.log
push eax
call fcn.005587a5
add esp, 0x28
lea eax, [ebp - 0x210]
push 0
push 0
push 4
push 0
push 3
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [esi + 4], eax
cmp eax, 0xffffffff
je 0x40223d
mov edi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 2
push 0
push 0
push eax
call edi
mov ebx, dword [sym.imp.KERNEL32.dll_WriteFile]
lea eax, [ebp - 0x2228]
push 0
push eax
push 2
lea eax, [ebp - 0x222c]
mov dword [ebp - 0x2228], 0
push eax
push dword [esi + 4]
mov dword [ebp - 0x222c], 0xfeff
call ebx
jmp 0x402119
mov edi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov ebx, dword [sym.imp.KERNEL32.dll_WriteFile]
push 0
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, dword [esi + 8]
jbe 0x40213d
push 0
push 0
push 0
push dword [esi + 4]
call edi
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
xor eax, eax
push 0x1ffe
push eax
mov word [ebp - 0x2210], ax
lea eax, [ebp - 0x220e]
push eax
call fcn.0055c960
add esp, 0xc
xor edi, edi
cmp byte [esi + 0xd], 0
je 0x4021b6
lea eax, [ebp - 0x2220]
push eax
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
movzx eax, word [ebp - 0x2214]
push eax
movzx eax, word [ebp - 0x2216]
push eax
movzx eax, word [ebp - 0x2218]
push eax
movzx eax, word [ebp - 0x221a]
push eax
movzx eax, word [ebp - 0x221e]
push eax
movzx eax, word [ebp - 0x2220]
push eax
lea eax, [ebp - 0x2210]
push str._04d__02d__02d__02d:_02d:_02d
push eax
call fcn.005587a5
add esp, 0x20
mov edi, eax
lea eax, [ebp + 0x10]
push eax
push dword [ebp + 0xc]
lea ecx, [ebp - 0x2210]
lea ecx, [ecx + edi*2]
push ecx
call fcn.00558b1a
add esp, 0xc
add edi, eax
cmp byte [esi + 0xe], 0
je 0x402200
add word [ebp + edi*2 - 0x2210], 0xd
add word [ebp + edi*2 - 0x220e], 0xa
add edi, 2
lea eax, [edi + edi]
cmp eax, 0x2000
jae 0x40224e
xor ecx, ecx
mov word [ebp + eax - 0x2210], cx
push 0
lea ecx, [ebp - 0x2224]
mov dword [ebp - 0x2224], 0
push ecx
lea eax, [edi + edi]
push eax
lea eax, [ebp - 0x2210]
push eax
push dword [esi + 4]
call ebx
cmp byte [esi + 0xc], 0
je 0x40223d
lea eax, [ebp - 0x2210]
push eax
push 0x5c3790
call fcn.00558dea
add esp, 8
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00557f7f
mov esp, ebp
pop ebp
ret
call fcn.00558d0e
int3