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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10058b96
mov eax, dword fs:[0]
push eax
mov eax, 0x8240
call fcn.10037d90
mov eax, dword [0x10074068]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, dword [ebp + 8]
push dword [edi + 0x18]
lea esi, [edi + 0x18]
mov dword [ebp - 0x824c], esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
lea eax, [edi + 4]
mov dword [ebp - 4], 0
mov dword [ebp - 0x8248], eax
mov eax, dword [eax]
cmp eax, 0xffffffff
je 0x10022724
cmp dword [edi + 0x14], 0
je 0x1002236c
push 0
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp dword [edi + 0x14], eax
jae 0x1002236c
mov ecx, edi
call fcn.10021d80
mov edi, dword [ebp - 0x8248]
push 2
push 0
push 0
push dword [edi]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
lea eax, [ebp - 0x4238]
xorps xmm0, xmm0
push eax
movups xmmword [ebp - 0x4238], xmm0
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
push 0x200
lea eax, [ebp - 0x210]
push 0
push eax
call fcn.10038ed0
movzx eax, word [ebp - 0x422a]
push eax
movzx eax, word [ebp - 0x422c]
push eax
movzx eax, word [ebp - 0x422e]
push eax
movzx eax, word [ebp - 0x4230]
push eax
movzx eax, word [ebp - 0x4232]
push eax
movzx eax, word [ebp - 0x4236]
push eax
movzx eax, word [ebp - 0x4238]
push eax
push str._04d__02d__02d__02d:_02d:_02d._03d
lea eax, [ebp - 0x210]
push 0x200
push eax
call fcn.100229f0
add esp, 0x34
test eax, eax
js 0x10022455
mov ecx, 0x200
lea eax, [ebp - 0x210]
nop word [eax + eax]
cmp byte [eax], 0
je 0x1002241b
inc eax
sub ecx, 1
jne 0x10022410
mov eax, 0x200
mov edx, ecx
sub eax, ecx
neg edx
sbb edx, edx
and edx, eax
test ecx, ecx
je 0x10022455
test edx, edx
je 0x10022455
push 0
lea eax, [ebp - 0x8240]
mov dword [ebp - 0x8240], 0
push eax
push edx
lea eax, [ebp - 0x210]
push eax
push dword [edi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
push 0x4000
lea eax, [ebp - 0x4210]
push 0
push eax
call fcn.10038ed0
add esp, 0xc
lea eax, [ebp + 0x10]
mov edx, 0x2000
push eax
push dword [ebp + 0xc]
push ecx
lea ecx, [ebp - 0x4210]
call fcn.10022a70
test eax, eax
js 0x10022680
lea eax, [ebp - 0x8238]
lea ecx, [ebp - 0x4210]
mov dword [ebp - 0x823c], eax
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x100224a0
sub ecx, edx
sar ecx, 1
push 0x4000
lea eax, [ecx + 1]
lea edi, [eax*4]
mov dword [ebp - 0x8240], eax
lea eax, [ebp - 0x8238]
mov edx, edi
push eax
lea ecx, [ebp - 0x823c]
call fcn.100089d0
add esp, 8
lea eax, [ebp - 0x4210]
push 0
push 0
push edi
push dword [ebp - 0x823c]
mov edi, dword [ebp - 0x8240]
push edi
push eax
push 0
push 3
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
xor ecx, ecx
test eax, eax
sete cl
mov dword [ebp - 0x8244], ecx
test eax, eax
jne 0x10022583
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x1002257d
push 0
push 0
push 0
push 0
push edi
lea eax, [ebp - 0x4210]
push eax
push 0
push 3
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov edi, eax
lea ecx, [ebp - 0x823c]
lea eax, [ebp - 0x8238]
mov edx, edi
push 0x4000
push eax
call fcn.100089d0
add esp, 8
lea eax, [ebp - 0x4210]
push 0
push 0
push edi
push dword [ebp - 0x823c]
push dword [ebp - 0x8240]
push eax
push 0
push 3
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov ecx, eax
neg ecx
sbb ecx, ecx
inc ecx
jmp 0x10022583
mov ecx, dword [ebp - 0x8244]
test ecx, ecx
jne 0x10022747
mov byte [ebp - 4], 1
mov edx, dword [ebp - 0x823c]
test edx, edx
je 0x10022664
mov ecx, 0x4000
mov eax, edx
cmp byte [eax], 0
je 0x100225af
inc eax
sub ecx, 1
jne 0x100225a4
mov eax, 0x4000
mov edi, ecx
sub eax, ecx
neg edi
sbb edi, edi
and edi, eax
test ecx, ecx
je 0x10022664
mov ecx, dword [ebp - 0x8248]
push edi
push edx
call fcn.100227f0
push 0x1006ab40
lea ecx, [ebp - 0x4228]
mov dword [ebp - 0x4218], 0
mov dword [ebp - 0x4214], 0xf
mov byte [ebp - 0x4228], 0
call fcn.1000bb50
cmp dword [ebp - 0x4214], 0x10
lea eax, [ebp - 0x4228]
push dword [ebp - 0x4218]
cmovae eax, dword [ebp - 0x4228]
mov ecx, dword [ebp - 0x8248]
push eax
call fcn.100227f0
mov edx, dword [ebp - 0x4214]
cmp edx, 0x10
jb 0x1002265e
mov ecx, dword [ebp - 0x4228]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x10022654
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10022761
push edx
push ecx
call fcn.10036da6
add esp, 8
mov edx, dword [ebp - 0x823c]
lea eax, [ebp - 0x8238]
cmp edx, eax
je 0x10022724
push edx
call fcn.1003e50c
add esp, 4
jmp 0x10022724
push str.Cant_write_to_log._Too_big_string._n
lea ecx, [ebp - 0x4228]
mov dword [ebp - 0x4218], 0
mov dword [ebp - 0x4214], 0xf
mov byte [ebp - 0x4228], 0
call fcn.1000bb50
mov edx, dword [ebp - 0x4214]
lea eax, [ebp - 0x4228]
mov ecx, dword [ebp - 0x4228]
cmp edx, 0x10
cmovae eax, ecx
cmp dword [ebp - 0x4218], 0
je 0x100226fa
push 0
lea ecx, [ebp - 0x8244]
mov dword [ebp - 0x8244], 0
push ecx
push dword [ebp - 0x4218]
push eax
push dword [edi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov edx, dword [ebp - 0x4214]
mov ecx, dword [ebp - 0x4228]
cmp edx, 0x10
jb 0x10022724
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x1002271a
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10022766
push edx
push ecx
call fcn.10036da6
add esp, 8
push dword [esi]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.10036d72
mov esp, ebp
pop ebp
ret
push ecx
mov ecx, dword [ebp - 0x823c]
lea edx, [ebp - 0x8238]
call fcn.100086d0
add esp, 4
call fcn.1000b2d0
call fcn.1003be19
call fcn.1003be19
int3