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

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x18cc
call fcn.00494df0
mov eax, dword [0x4f9b3c]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [ebp + 0x1c]
push esi
mov esi, dword [ebp + 0x18]
push edi
mov edi, ecx
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 0x18ac], ecx
mov ecx, dword [ebp + 0x14]
mov dword [ebp - 0x18b8], eax
mov dword [ebp - 0x18a8], ecx
cmp eax, dword [edi + 0x38]
jg 0x42f66c
push 0x6400000
mov ecx, edi
call fcn.0042f308
xor eax, eax
push 0x1000
push eax
mov word [ebp - 0x18a4], ax
lea eax, [ebp - 0x18a2]
push eax
call fcn.00492b40
push ebx
push esi
lea eax, [ebp - 0x18a4]
push 0x800
push eax
call fcn.00494dc9
add esp, 0x1c
push 0xffffffffffffffff
push dword [edi + 0x5c]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
lea eax, [edi + 0x1c]
cmp dword [eax + 0x14], 8
jb 0x42f410
mov eax, dword [eax]
xor ebx, ebx
push ebx
push 0x80
push 4
push ebx
push 1
push 0xc0000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
mov dword [ebp - 0x18b4], esi
cmp esi, 0xffffffff
je 0x42f663
lea eax, [ebp - 0x18c4]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
test eax, eax
jne 0x42f46d
push ebx
lea eax, [ebp - 0x18cc]
push eax
push 2
lea eax, [ebp - 0x18b0]
push eax
push esi
mov word [ebp - 0x18b0], 0xfeff
call dword [sym.imp.KERNEL32.dll_WriteFile]
lea eax, [ebp - 0x18c0]
push eax
call fcn.00493ec8
mov dword [ebp - 0x18c0], eax
lea eax, [ebp - 0x18c0]
push eax
mov dword [ebp - 0x18bc], edx
call fcn.00493ea1
mov esi, eax
xor eax, eax
push 0x898
mov word [ebp - 0x8a0], ax
lea eax, [ebp - 0x89e]
push ebx
push eax
call fcn.00492b40
add esp, 0x14
cmp dword [edi + 0x38], 4
jg 0x42f52d
cmp dword [edi + 0x14], 8
jb 0x42f4c7
mov eax, dword [edi]
mov dword [ebp - 0x18a8], eax
jmp 0x42f4cd
mov dword [ebp - 0x18a8], edi
lea eax, [ebp - 0x18a4]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
push dword [ebp - 0x18a8]
mov eax, dword [ebp - 0x18b8]
movsx eax, byte [eax + str.ENNNIWARNT]
push eax
push dword [esi]
mov eax, dword [esi + 0x10]
push dword [esi + 4]
inc eax
push dword [esi + 8]
push dword [esi + 0xc]
push eax
mov eax, dword [esi + 0x14]
add eax, 0x76c
push eax
push str._d__02d__02d__02d:_02d:_02d__t_c__t_s__t_08x:_08x__t_s_r_n
lea eax, [ebp - 0x8a0]
push 0x44c
push eax
call fcn.0049372c
add esp, 0x38
jmp 0x42f60f
cmp dword [ebp - 0x18ac], ebx
jne 0x42f53d
mov dword [ebp - 0x18ac], ebx
jmp 0x42f56d
push dword [ebp - 0x18ac]
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea ebx, [eax + 1]
lea eax, [ebx + ebx]
call fcn.00493700
mov eax, esp
push 0
push ebx
push dword [ebp - 0x18ac]
push eax
call fcn.0042f2c6
mov dword [ebp - 0x18ac], eax
xor ebx, ebx
cmp dword [ebp - 0x18a8], ebx
jne 0x42f579
xor eax, eax
jmp 0x42f5a1
push dword [ebp - 0x18a8]
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea ebx, [eax + 1]
lea eax, [ebx + ebx]
call fcn.00493700
mov eax, esp
push 0
push ebx
push dword [ebp - 0x18a8]
push eax
call fcn.0042f2c6
cmp dword [edi + 0x14], 8
jb 0x42f5ab
mov ebx, dword [edi]
jmp 0x42f5ad
mov ebx, edi
push dword [ebp + 0x10]
lea ecx, [ebp - 0x18a4]
push dword [ebp - 0x18ac]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
mov eax, dword [ebp - 0x18b8]
movsx eax, byte [eax + str.ENNNIWARNT]
push ebx
push eax
push dword [esi]
mov eax, dword [esi + 0x10]
push dword [esi + 4]
inc eax
push dword [esi + 8]
push dword [esi + 0xc]
push eax
mov eax, dword [esi + 0x14]
add eax, 0x76c
push eax
push str._d__02d__02d__02d:_02d:_02d__t_c__t_s__t_08x:_08x__t__s__s__tFL:_s__d__r_n
lea eax, [ebp - 0x8a0]
push 0x44c
push eax
call fcn.0049372c
add esp, 0x44
xor ebx, ebx
lea eax, [ebp - 0x8a0]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
push 2
push ebx
push ebx
push dword [ebp - 0x18b4]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push ebx
lea eax, [ebp - 0x18c8]
push eax
lea eax, [ebp - 0x8a0]
push eax
call fcn.00493091
pop ecx
add eax, eax
push eax
lea eax, [ebp - 0x8a0]
push eax
push dword [ebp - 0x18b4]
call dword [sym.imp.KERNEL32.dll_WriteFile]
push dword [ebp - 0x18b4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [edi + 0x5c]
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
lea esp, [ebp - 0x18d8]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004927bf
leave
ret 0x18