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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x57c1d0
mov eax, dword fs:[0]
push eax
sub esp, 0x34
mov eax, dword [0x5d5ff0]
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, ecx
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 0x10]
mov esi, dword [ebp + 0x14]
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x38], eax
mov eax, dword [edi + 0x200c]
cmp dword [eax - 0xc], 0
je 0x56ac8d
mov eax, dword [edi + 0x2010]
cmp dword [eax - 0xc], 0
je 0x56ac8d
push ecx
lea ecx, [ebp - 0x30]
call fcn.0056a510
push 0x58a950
push 0x5869dc
lea ecx, [ebp - 0x30]
mov dword [ebp - 4], 0
call fcn.0056acb0
push 0x58a950
push 0x5824ec
lea ecx, [ebp - 0x30]
call fcn.0056acb0
test esi, esi
je 0x56ac6b
push esi
lea ecx, [ebp - 0x2c]
mov byte [ebp - 0x21], 0
call fcn.0056a510
push 0x58a950
push 0x5869dc
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], 1
call fcn.0056acb0
push 0x58a950
push 0x5824ec
lea ecx, [ebp - 0x2c]
call fcn.0056acb0
lea eax, [edi + 0x201c]
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [edi + 0x2004]
test eax, eax
je 0x56aa9b
cmp dword [edi + 0x2034], eax
jb 0x56aa9b
mov ecx, edi
call fcn.0056af10
mov byte [ebp - 0x34], 1
jmp 0x56aab1
cmp dword [edi + 0x2034], 2
mov ecx, 1
movzx eax, byte [ebp - 0x21]
cmovbe eax, ecx
mov dword [ebp - 0x34], eax
mov esi, dword [edi + 0x2014]
push 0
push 0x2000080
push 4
mov byte [ebp - 0x21], 0
call fcn.0056a810
push eax
push 1
push 0x40000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
test esi, esi
je 0x56ab29
cmp esi, 0xffffffff
je 0x56ab29
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, 0xffffffff
je 0x56ab2d
test eax, eax
jne 0x56ab1d
push eax
lea eax, [ebp - 0x40]
mov word [ebp - 0x28], 0xfeff
push eax
push 2
lea eax, [ebp - 0x28]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov dword [edi + 0x2034], 2
mov byte [ebp - 0x21], 1
jmp 0x56ab2d
mov dword [edi + 0x2034], eax
mov byte [ebp - 0x21], 1
jmp 0x56ab2d
mov byte [ebp - 0x21], 0
push 2
push 0
push 0
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x56ac3f
cmp byte [ebp - 0x21], 0
je 0x56ac3f
cmp byte [ebp - 0x34], 1
mov dword [ebp - 0x28], 0
jne 0x56aba9
cmp dword [edi + 0x2034], 2
mov eax, str._r_n_r_n_r_n_r_n_r_nType_tPID_tTID_tDateTime_local__tSystem_tContext_tMessage_r_n
mov edx, str.Type_tPID_tTID_tDateTime_local__tSystem_tContext_tMessage_r_n
cmova edx, eax
mov ecx, edx
lea eax, [ecx + 2]
mov dword [ebp - 0x34], eax
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x56ab76
sub ecx, dword [ebp - 0x34]
sar ecx, 1
push 0
lea eax, [ecx + ecx]
lea ecx, [ebp - 0x28]
push ecx
push eax
push edx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ecx, dword [ebp - 0x28]
add dword [edi + 0x2034], ecx
test eax, eax
je 0x56ac38
lea eax, [ebp - 0x20]
xorps xmm0, xmm0
push eax
movups xmmword [ebp - 0x20], xmm0
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
mov eax, dword [ebp - 0x38]
test eax, eax
je 0x56abc7
cmp word [eax], 0
jne 0x56abcc
mov eax, 0x5b66e8
push dword [ebp - 0x2c]
push dword [ebp - 0x30]
push eax
movzx eax, word [ebp - 0x12]
push eax
movzx eax, word [ebp - 0x14]
push eax
movzx eax, word [ebp - 0x16]
push eax
movzx eax, word [ebp - 0x18]
push eax
movzx eax, word [ebp - 0x1a]
push eax
movzx eax, word [ebp - 0x1e]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
mov eax, dword [ebp - 0x3c]
push dword [eax*4 + 0x5d6940]
push str._s_t_4u_t_4u_t_02d__02d__02d:_02d:_02d._03d_t_s_t_s:_t_s_r_n
push 0xffffffffffffffff
push 0x1000
push edi
call fcn.00406dda
add esp, 0x40
lea ecx, [ebp - 0x28]
add eax, eax
push 0
push ecx
push eax
push edi
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [ebp - 0x28]
add dword [edi + 0x2034], eax
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [edi + 0x201c]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov edx, dword [ebp - 0x2c]
or eax, 0xffffffff
mov byte [ebp - 4], 0
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x56ac6b
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x30]
or eax, 0xffffffff
mov dword [ebp - 4], 0xffffffff
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x56ac8d
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
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.00547faa
mov esp, ebp
pop ebp
ret 0x10