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

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x18d0
call fcn.004b14f0
mov eax, dword [0x5603e8]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
mov edx, dword [ebp + 0x14]
push ebx
mov ebx, dword [ebp + 0x1c]
push esi
mov esi, ecx
mov ecx, dword [ebp + 0xc]
push edi
mov edi, dword [ebp + 0x18]
mov dword [ebp - 0x18a8], esi
mov dword [ebp - 0x18b4], eax
mov dword [ebp - 0x18b0], ecx
mov dword [ebp - 0x18b8], edx
cmp eax, dword [esi + 0x38]
jg 0x4879db
push 0x6400000
mov ecx, esi
call fcn.00487620
xor eax, eax
push 0x1000
push eax
lea ecx, [ebp - 0x18a2]
push ecx
mov word [ebp - 0x18a4], ax
call sub.MSVCR100.dll_memset
push ebx
push edi
lea edx, [ebp - 0x18a4]
push 0x800
push edx
call dword [sym.imp.MSVCR100.dll__vsnwprintf]
mov eax, dword [esi + 0x40]
add esp, 0x1c
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp dword [esi + 0x30], 8
lea eax, [esi + 0x1c]
jb 0x487741
mov eax, dword [eax]
push 0
push 0x80
push 4
push 0
push 1
push 0xc0000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
mov dword [ebp - 0x18bc], ebx
cmp ebx, 0xffffffff
je 0x4879d1
lea ecx, [ebp - 0x18cc]
push ecx
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
test eax, eax
jne 0x48779e
push eax
lea edx, [ebp - 0x18d0]
push edx
push 2
lea eax, [ebp - 0x18ac]
push eax
push ebx
mov word [ebp - 0x18ac], 0xfeff
call dword [sym.imp.KERNEL32.dll_WriteFile]
lea ecx, [ebp - 0x18c4]
push ecx
call dword [sym.imp.MSVCR100.dll__time64]
mov dword [ebp - 0x18c0], edx
lea edx, [ebp - 0x18c4]
push edx
mov dword [ebp - 0x18c4], eax
call dword [sym.imp.MSVCR100.dll__localtime64]
mov edi, eax
xor eax, eax
push 0x898
push eax
lea ecx, [ebp - 0x89e]
push ecx
mov word [ebp - 0x8a0], ax
call sub.MSVCR100.dll_memset
add esp, 0x14
cmp dword [esi + 0x38], 4
jg 0x487866
cmp dword [esi + 0x14], 8
jb 0x4877fa
mov edx, dword [esi]
mov dword [ebp - 0x18ac], edx
jmp 0x487800
mov dword [ebp - 0x18ac], esi
lea eax, [ebp - 0x18a4]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov edx, dword [ebp - 0x18b4]
mov ecx, dword [ebp - 0x18ac]
push eax
movsx eax, byte [edx + str.ENNNIWARNT]
mov edx, dword [edi + 4]
push ecx
mov ecx, dword [edi]
push eax
mov eax, dword [edi + 8]
push ecx
mov ecx, dword [edi + 0xc]
push edx
mov edx, dword [edi + 0x10]
push eax
mov eax, dword [edi + 0x14]
push ecx
inc edx
push edx
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 ecx, [ebp - 0x8a0]
push 0x44c
push ecx
call dword [sym.imp.MSVCR100.dll__snwprintf]
add esp, 0x38
jmp 0x48797e
mov eax, dword [ebp - 0x18b0]
test eax, eax
jne 0x487878
mov dword [ebp - 0x18b0], eax
jmp 0x4878b6
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea esi, [eax + 1]
lea eax, [esi + esi]
call fcn.004b1530
mov eax, dword [ebp - 0x18b0]
mov ebx, esp
push esi
push ebx
push 0xffffffffffffffff
xor edx, edx
push eax
push edx
push edx
mov word [ebx], dx
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov esi, dword [ebp - 0x18a8]
mov dword [ebp - 0x18b0], ebx
mov ebx, dword [ebp - 0x18bc]
mov eax, dword [ebp - 0x18b8]
test eax, eax
je 0x4878fa
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea esi, [eax + 1]
lea eax, [esi + esi]
call fcn.004b1530
mov edx, dword [ebp - 0x18b8]
mov ebx, esp
push esi
push ebx
push 0xffffffffffffffff
xor ecx, ecx
push edx
push ecx
push ecx
mov word [ebx], cx
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov esi, dword [ebp - 0x18a8]
mov eax, ebx
mov ebx, dword [ebp - 0x18bc]
cmp dword [esi + 0x14], 8
jb 0x48790a
mov ecx, dword [esi]
mov dword [ebp - 0x18a8], ecx
jmp 0x487910
mov dword [ebp - 0x18a8], esi
mov edx, dword [ebp + 0x10]
mov ecx, dword [ebp - 0x18b0]
push edx
push ecx
lea edx, [ebp - 0x18a4]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov ecx, dword [ebp - 0x18b4]
movsx edx, byte [ecx + str.ENNNIWARNT]
mov ecx, dword [edi + 4]
push eax
mov eax, dword [ebp - 0x18a8]
push eax
mov eax, dword [edi]
push edx
mov edx, dword [edi + 8]
push eax
mov eax, dword [edi + 0xc]
push ecx
mov ecx, dword [edi + 0x10]
push edx
mov edx, dword [edi + 0x14]
push eax
inc ecx
push ecx
add edx, 0x76c
push edx
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 dword [sym.imp.MSVCR100.dll__snwprintf]
add esp, 0x44
lea ecx, [ebp - 0x8a0]
push ecx
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
push 2
push 0
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
lea eax, [ebp - 0x8a0]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4879a1
sub eax, edx
push 0
sar eax, 1
lea edx, [ebp - 0x18c8]
push edx
add eax, eax
push eax
lea ecx, [ebp - 0x8a0]
push ecx
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [esi + 0x40]
push edx
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
lea esp, [ebp - 0x18dc]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004b12f6
mov esp, ebp
pop ebp
ret 0x18