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

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x7eb4
call fcn.00497500
mov eax, dword [0x5002b0]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
mov esi, dword [ebp + 0x18]
push edi
mov edi, ecx
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 0x7e90], ecx
mov ecx, dword [ebp + 0x14]
mov dword [ebp - 0x7e9c], ecx
mov ecx, dword [ebp + 0x1c]
mov dword [ebp - 0x7ea0], eax
mov dword [ebp - 0x7e94], ecx
cmp eax, dword [edi + 0x38]
jg 0x4030af
push 0x6400000
mov ecx, edi
call fcn.00402d54
xor eax, eax
mov ebx, 0x3f40
push ebx
push eax
mov word [ebp - 0x3f48], ax
lea eax, [ebp - 0x3f46]
push eax
call fcn.00495b20
push dword [ebp - 0x7e94]
lea eax, [ebp - 0x3f48]
push esi
push 0x1fa0
push eax
call fcn.004974dd
add esp, 0x1c
push 0xffffffffffffffff
push dword [edi + 0x40]
call dword [sym.imp.KERNEL32.DLL_WaitForSingleObject]
lea eax, [edi + 0x1c]
cmp dword [eax + 0x14], 8
jb 0x402e68
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 esi, eax
mov dword [ebp - 0x7e94], esi
cmp esi, 0xffffffff
je 0x4030a6
lea eax, [ebp - 0x7eac]
push eax
push esi
call dword [sym.imp.KERNEL32.DLL_GetFileSize]
test eax, eax
jne 0x402ec5
push eax
lea eax, [ebp - 0x7eb4]
push eax
push 2
lea eax, [ebp - 0x7e98]
push eax
push esi
mov word [ebp - 0x7e98], 0xfeff
call dword [sym.imp.KERNEL32.DLL_WriteFile]
lea eax, [ebp - 0x7ea8]
push eax
call fcn.00496768
mov dword [ebp - 0x7ea8], eax
lea eax, [ebp - 0x7ea8]
push eax
mov dword [ebp - 0x7ea4], edx
call fcn.00496741
mov esi, eax
xor eax, eax
push ebx
mov word [ebp - 0x7e8c], ax
xor ebx, ebx
lea eax, [ebp - 0x7e8a]
push ebx
push eax
call fcn.00495b20
add esp, 0x14
cmp dword [edi + 0x38], 4
jg 0x402f74
cmp dword [edi + 0x14], 8
jb 0x402f17
mov ebx, dword [edi]
jmp 0x402f19
mov ebx, edi
lea eax, [ebp - 0x3f48]
push eax
call dword [sym.imp.KERNEL32.DLL_GetCurrentThreadId]
push eax
call dword [sym.imp.KERNEL32.DLL_GetCurrentProcessId]
push eax
mov eax, dword [ebp - 0x7ea0]
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_r_n
lea eax, [ebp - 0x7e8c]
push 0x1fa0
push eax
call fcn.00495fcc
add esp, 0x38
jmp 0x403050
cmp dword [ebp - 0x7e90], ebx
jne 0x402f84
mov dword [ebp - 0x7e90], ebx
jmp 0x402fb2
push dword [ebp - 0x7e90]
call dword [sym.imp.KERNEL32.DLL_lstrlenA]
lea ebx, [eax + 1]
lea eax, [ebx + ebx]
call fcn.00495fa0
mov eax, esp
push 0
push ebx
push dword [ebp - 0x7e90]
push eax
call fcn.00402d2e
mov dword [ebp - 0x7e90], eax
xor eax, eax
cmp dword [ebp - 0x7e9c], eax
je 0x402fe4
push dword [ebp - 0x7e9c]
call dword [sym.imp.KERNEL32.DLL_lstrlenA]
lea ebx, [eax + 1]
lea eax, [ebx + ebx]
call fcn.00495fa0
mov eax, esp
push 0
push ebx
push dword [ebp - 0x7e9c]
push eax
call fcn.00402d2e
cmp dword [edi + 0x14], 8
jb 0x402fee
mov ebx, dword [edi]
jmp 0x402ff0
mov ebx, edi
push dword [ebp + 0x10]
lea ecx, [ebp - 0x3f48]
push dword [ebp - 0x7e90]
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 - 0x7ea0]
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 - 0x7e8c]
push 0x1fa0
push eax
call fcn.00495fcc
add esp, 0x44
lea eax, [ebp - 0x7e8c]
push eax
call dword [sym.imp.KERNEL32.DLL_OutputDebugStringW]
push 2
xor esi, esi
push esi
push esi
push dword [ebp - 0x7e94]
call dword [sym.imp.KERNEL32.DLL_SetFilePointer]
push esi
lea eax, [ebp - 0x7eb0]
push eax
lea eax, [ebp - 0x7e8c]
push eax
call fcn.00495461
pop ecx
add eax, eax
push eax
lea eax, [ebp - 0x7e8c]
push eax
push dword [ebp - 0x7e94]
call dword [sym.imp.KERNEL32.DLL_WriteFile]
push dword [ebp - 0x7e94]
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
push dword [edi + 0x40]
call dword [sym.imp.KERNEL32.DLL_ReleaseMutex]
lea esp, [ebp - 0x7ec0]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004959f8
leave
ret 0x18