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

Disassembly:
sub esp, 0x184
mov eax, dword [0x42b160]
xor eax, esp
mov dword [esp + 0x180], eax
push esi
mov esi, ecx
mov ecx, dword [esi + 0x8c]
lea eax, [esp + 0x1c]
push eax
mov dword [esp + 8], 0
call fcn.00407280
test eax, eax
jne 0x407454
push 0x42698c
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
pop esi
mov ecx, dword [esp + 0x180]
xor ecx, esp
call fcn.0041869b
add esp, 0x184
ret
mov edx, dword [esi + 0xc]
lea ecx, [esp + 0x1c]
push ecx
push edx
lea eax, [esp + 0x88]
push str._s_rczs_s.rcz
push eax
call fcn.0041861e
add esp, 0x10
push 0
push 0x80
push 4
push 0
push 3
push 0xc0000000
lea ecx, [esp + 0x98]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [esi], eax
cmp eax, 0xffffffff
jne 0x4074ce
push 0x426968
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov eax, dword [esi]
cmp eax, 0xffffffff
je 0x4074b2
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esi], 0xffffffff
pop esi
mov ecx, dword [esp + 0x180]
xor ecx, esp
call fcn.0041869b
add esp, 0x184
ret
push ebx
push ebp
push edi
push 0
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, dword [sym.imp.KERNEL32.dll_ReadFile]
lea edi, [esi + 0x10]
mov dword [esp + 0x10], eax
mov ebp, edi
mov dword [esp + 0x14], 0x1c
mov eax, dword [esi]
push 0
lea edx, [esp + 0x14]
push edx
push 4
push ebp
push eax
call ebx
add ebp, 4
sub dword [esp + 0x14], 1
jne 0x4074f1
mov edx, dword [esi]
push 0
lea ecx, [esp + 0x14]
push ecx
push 4
lea eax, [esi + 0x80]
push eax
push edx
call ebx
mov edx, dword [esi]
push 0
lea ecx, [esp + 0x14]
push ecx
push 4
lea eax, [esi + 0x84]
push eax
push edx
call ebx
mov edx, dword [esi]
push 0
lea ecx, [esp + 0x14]
push ecx
push 4
lea eax, [esi + 0x88]
push eax
push edx
call ebx
lea eax, [esp + 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
movzx ebx, word [esp + 0x18]
mov bp, word [esp + 0x1e]
cmp ebx, dword [edi + 0x70]
jne 0x407575
movzx ecx, word [esp + 0x1a]
cmp ecx, dword [edi + 0x74]
jne 0x407575
movzx edx, bp
cmp edx, dword [edi + 0x78]
je 0x407582
push 0x70
push 0
push edi
call fcn.00418570
add esp, 0xc
movzx eax, word [esp + 0x1a]
movzx ecx, bp
mov dword [edi + 0x70], ebx
mov dword [edi + 0x74], eax
mov dword [edi + 0x78], ecx
mov edx, dword [esi]
push edx
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
mov eax, dword [esi]
push eax
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
mov ecx, dword [esi]
push 0
push 0
push 0
push ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov ebx, dword [sym.imp.KERNEL32.dll_WriteFile]
mov ebp, 0x1c
nop
mov eax, dword [esi]
push 0
lea edx, [esp + 0x14]
push edx
push 4
push edi
push eax
call ebx
add edi, 4
sub ebp, 1
jne 0x4075c0
mov edx, dword [esi]
push ebp
lea ecx, [esp + 0x14]
push ecx
push 4
lea eax, [esi + 0x80]
push eax
push edx
call ebx
mov ecx, dword [esi]
push ebp
lea eax, [esp + 0x14]
push eax
push 4
lea eax, [esi + 0x84]
push eax
push ecx
call ebx
push ebp
lea edx, [esp + 0x14]
push edx
push 4
lea eax, [esi + 0x88]
push eax
mov eax, dword [esi]
push eax
call ebx
push 0x426954
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov ecx, dword [esp + 0x190]
pop edi
pop ebp
pop ebx
pop esi
xor ecx, esp
call fcn.0041869b
add esp, 0x184
ret