Function at 0x4045b0
Capabilities:
Get file size
Print debug messages
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x534d47
mov eax, dword fs:[0]
push eax
mov eax, 0x8a40
call fcn.004b0a90
mov eax, dword [0x58c758]
xor eax, ebp
mov dword [ebp - 0x10], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
cmp dword [ebp + 0xc], 0
jne 0x4045ec
xor eax, eax
jmp 0x404986
mov eax, dword [ebp + 8]
cmp dword [eax + 0x2c], 0
jne 0x4045fc
xor eax, eax
jmp 0x404986
xor ecx, ecx
mov word [ebp - 0x114], cx
push 0xfe
push 0
lea edx, [ebp - 0x112]
push edx
call fcn.004b0ac0
add esp, 0xc
xor eax, eax
mov word [ebp - 0x224], ax
push 0xfe
push 0
lea ecx, [ebp - 0x222]
push ecx
call fcn.004b0ac0
add esp, 0xc
mov edx, dword [ebp + 8]
add edx, 0x10
push edx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
lea ecx, [ebp - 0x22c]
call fcn.00403840
mov dword [ebp - 4], 0
lea eax, [ebp + 0x10]
mov dword [ebp - 0x228], eax
mov ecx, dword [ebp - 0x228]
push ecx
mov edx, dword [ebp + 0xc]
push edx
lea ecx, [ebp - 0x22c]
call fcn.004061a0
mov dword [ebp - 0x228], 0
lea eax, [ebp - 0x124]
push eax
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
movzx ecx, word [ebp - 0x11e]
push ecx
movzx edx, word [ebp - 0x122]
push edx
movzx eax, word [ebp - 0x124]
push eax
push str._04d__02d__02d
lea ecx, [ebp - 0x224]
push ecx
call fcn.00401ba0
add esp, 0x14
movzx edx, word [ebp - 0x118]
push edx
movzx eax, word [ebp - 0x11a]
push eax
movzx ecx, word [ebp - 0x11c]
push ecx
push str._02d:_02d:_02d
lea edx, [ebp - 0x114]
push edx
call fcn.00401ba0
add esp, 0x14
mov eax, dword [ebp + 8]
cmp dword [eax], 0
je 0x40487e
mov ecx, dword [ebp + 8]
cmp dword [ecx + 0x38], 0
je 0x4047a9
mov dword [ebp - 0x23c], 0
mov dword [ebp - 0x238], 0
lea edx, [ebp - 0x23c]
push edx
mov eax, dword [ebp + 8]
mov ecx, dword [eax]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x38]
xor ecx, ecx
mov dword [ebp - 0x8a4c], eax
mov dword [ebp - 0x8a48], ecx
mov edx, dword [ebp - 0x238]
cmp edx, dword [ebp - 0x8a48]
jl 0x4047a9
jg 0x404759
mov eax, dword [ebp - 0x23c]
cmp eax, dword [ebp - 0x8a4c]
jbe 0x4047a9
mov dword [ebp - 0x23c], 0
mov dword [ebp - 0x238], 0
mov dword [ebp - 0x23c], 2
mov dword [ebp - 0x238], 0
push 0
lea ecx, [ebp - 0x238]
push ecx
mov edx, dword [ebp - 0x23c]
push edx
mov eax, dword [ebp + 8]
mov ecx, dword [eax]
push ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov edx, dword [ebp + 8]
mov eax, dword [edx]
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
mov dword [ebp - 0x230], 0
mov ecx, dword [ebp + 8]
cmp dword [ecx + 0xc], 0
je 0x40480c
lea edx, [ebp - 0x114]
push edx
lea eax, [ebp - 0x224]
push eax
push 0x540c3c
lea ecx, [ebp - 0xa3c]
push ecx
call fcn.00401ba0
add esp, 0x10
push 0
lea edx, [ebp - 0x230]
push edx
lea eax, [ebp - 0xa3c]
push eax
call fcn.004b0eb7
add esp, 4
shl eax, 1
push eax
lea ecx, [ebp - 0xa3c]
push ecx
mov edx, dword [ebp + 8]
mov eax, dword [edx]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
push 0
lea ecx, [ebp - 0x230]
push ecx
lea ecx, [ebp - 0x22c]
call fcn.0043e290
push eax
call fcn.004b0eb7
add esp, 4
shl eax, 1
push eax
lea ecx, [ebp - 0x22c]
call fcn.0043e290
push eax
mov edx, dword [ebp + 8]
mov eax, dword [edx]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ecx, dword [ebp + 8]
cmp dword [ecx + 0x30], 0
je 0x404869
push 0
lea edx, [ebp - 0x230]
push edx
push 4
push 0x540c1c
mov eax, dword [ebp + 8]
mov ecx, dword [eax]
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov edx, dword [ebp + 8]
cmp dword [edx + 8], 0
je 0x40487e
mov eax, dword [ebp + 8]
mov ecx, dword [eax]
push ecx
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
mov eax, dword [ebp + 8]
cmp dword [eax + 0x34], 0
je 0x4048a4
lea ecx, [ebp - 0x22c]
call fcn.0043e290
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
push 0x540c38
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov ecx, dword [ebp + 8]
cmp dword [ecx + 0x3c], 0
je 0x404957
mov edx, dword [ebp + 8]
cmp dword [edx + 0x44], 0
je 0x404957
mov eax, dword [ebp + 8]
cmp dword [eax + 0xc], 0
je 0x4048eb
mov ecx, dword [ebp - 0x22c]
push ecx
lea edx, [ebp - 0x114]
push edx
push str._s__s
lea eax, [ebp - 0x8a3c]
push eax
call fcn.00401ba0
add esp, 0x10
jmp 0x404906
mov ecx, dword [ebp - 0x22c]
push ecx
push 0x540c24
lea edx, [ebp - 0x8a3c]
push edx
call fcn.00401ba0
add esp, 0xc
mov eax, dword [ebp + 8]
add eax, 0x54
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
lea ecx, [ebp - 0x8a3c]
push ecx
lea ecx, [ebp - 0x8a40]
call fcn.00401e30
mov byte [ebp - 4], 1
lea edx, [ebp - 0x8a40]
push edx
mov ecx, dword [ebp + 8]
add ecx, 0x6c
call fcn.00404d00
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x8a40]
call fcn.00401eb0
mov eax, dword [ebp + 8]
add eax, 0x54
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [ebp + 8]
add ecx, 0x10
push ecx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov dword [ebp - 0x8a44], 1
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x22c]
call fcn.00401eb0
mov eax, dword [ebp - 0x8a44]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004b0a79
mov esp, ebp
pop ebp
ret