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

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x18cc
call fcn.004e07c0
mov eax, dword [0x547240]
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 0x4081b8
push 0x6400000
mov ecx, edi
call fcn.00407e54
xor eax, eax
push 0x1000
push eax
mov word [ebp - 0x18a4], ax
lea eax, [ebp - 0x18a2]
push eax
call fcn.004de430
push ebx
push esi
lea eax, [ebp - 0x18a4]
push 0x800
push eax
call fcn.004e07a3
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 0x407f5c
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 0x4081af
lea eax, [ebp - 0x18c4]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
test eax, eax
jne 0x407fb9
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.004dfb68
mov dword [ebp - 0x18c0], eax
lea eax, [ebp - 0x18c0]
push eax
mov dword [ebp - 0x18bc], edx
call fcn.004dfb41
mov esi, eax
xor eax, eax
push 0x898
mov word [ebp - 0x8a0], ax
lea eax, [ebp - 0x89e]
push ebx
push eax
call fcn.004de430
add esp, 0x14
cmp dword [edi + 0x38], 4
jg 0x408079
cmp dword [edi + 0x14], 8
jb 0x408013
mov eax, dword [edi]
mov dword [ebp - 0x18a8], eax
jmp 0x408019
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.004df3cc
add esp, 0x38
jmp 0x40815b
cmp dword [ebp - 0x18ac], ebx
jne 0x408089
mov dword [ebp - 0x18ac], ebx
jmp 0x4080b9
push dword [ebp - 0x18ac]
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea ebx, [eax + 1]
lea eax, [ebx + ebx]
call fcn.004df3a0
mov eax, esp
push 0
push ebx
push dword [ebp - 0x18ac]
push eax
call fcn.00407e2e
mov dword [ebp - 0x18ac], eax
xor ebx, ebx
cmp dword [ebp - 0x18a8], ebx
jne 0x4080c5
xor eax, eax
jmp 0x4080ed
push dword [ebp - 0x18a8]
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea ebx, [eax + 1]
lea eax, [ebx + ebx]
call fcn.004df3a0
mov eax, esp
push 0
push ebx
push dword [ebp - 0x18a8]
push eax
call fcn.00407e2e
cmp dword [edi + 0x14], 8
jb 0x4080f7
mov ebx, dword [edi]
jmp 0x4080f9
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.004df3cc
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.004df380
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 + 0x40]
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.004dea60
leave
ret 0x18