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

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x7eb8
call fcn.004bab30
mov eax, dword [0x590cc0]
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, dword [ebp + 0x18]
push edi
mov edi, ecx
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 0x7e98], edi
mov dword [ebp - 0x7ea0], eax
mov dword [ebp - 0x7e90], ecx
mov dword [ebp - 0x7e9c], edx
cmp eax, dword [edi + 0x38]
jg 0x41a990
push 0x6400000
mov ecx, edi
call fcn.0041a5f0
xor eax, eax
push 0x3f40
push eax
lea ecx, [ebp - 0x3f46]
push ecx
mov word [ebp - 0x3f48], ax
call fcn.004ba010
push ebx
push esi
lea edx, [ebp - 0x3f48]
push 0x1fa0
push edx
call fcn.004bc3c0
mov eax, dword [edi + 0x40]
add esp, 0x1c
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.DLL_WaitForSingleObject]
cmp dword [edi + 0x30], 8
lea eax, [edi + 0x1c]
jb 0x41a710
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 - 0x7ea4], ebx
cmp ebx, 0xffffffff
je 0x41a986
lea ecx, [ebp - 0x7eb0]
push ecx
push ebx
call dword [sym.imp.KERNEL32.DLL_GetFileSize]
test eax, eax
jne 0x41a76d
push eax
lea edx, [ebp - 0x7eb8]
push edx
push 2
lea eax, [ebp - 0x7e94]
push eax
push ebx
mov word [ebp - 0x7e94], 0xfeff
call dword [sym.imp.KERNEL32.DLL_WriteFile]
lea ecx, [ebp - 0x7eac]
push ecx
call fcn.004b9cd0
mov dword [ebp - 0x7ea8], edx
lea edx, [ebp - 0x7eac]
push edx
mov dword [ebp - 0x7eac], eax
call fcn.004b9ca9
mov esi, eax
xor eax, eax
push 0x3f40
push eax
lea ecx, [ebp - 0x7e8a]
push ecx
mov word [ebp - 0x7e8c], ax
call fcn.004ba010
add esp, 0x14
cmp dword [edi + 0x38], 4
jg 0x41a832
cmp dword [edi + 0x14], 8
jb 0x41a7c7
mov edx, dword [edi]
mov dword [ebp - 0x7e94], edx
jmp 0x41a7cd
mov dword [ebp - 0x7e94], edi
lea eax, [ebp - 0x3f48]
push eax
call dword [sym.imp.KERNEL32.DLL_GetCurrentThreadId]
push eax
call dword [sym.imp.KERNEL32.DLL_GetCurrentProcessId]
mov edx, dword [ebp - 0x7ea0]
mov ecx, dword [ebp - 0x7e94]
push eax
movsx eax, byte [edx + str.ENNNIWARNT]
mov edx, dword [esi + 4]
push ecx
mov ecx, dword [esi]
push eax
mov eax, dword [esi + 8]
push ecx
mov ecx, dword [esi + 0xc]
push edx
mov edx, dword [esi + 0x10]
push eax
mov eax, dword [esi + 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 - 0x7e8c]
push 0x1fa0
push ecx
call fcn.004bb11c
add esp, 0x38
jmp 0x41a932
mov eax, dword [ebp - 0x7e90]
test eax, eax
jne 0x41a844
mov dword [ebp - 0x7e90], eax
jmp 0x41a87c
push eax
call dword [sym.imp.KERNEL32.DLL_lstrlenA]
lea edi, [eax + 1]
lea eax, [edi + edi]
call fcn.004bb0f0
mov eax, dword [ebp - 0x7e90]
mov ebx, esp
push edi
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 edi, dword [ebp - 0x7e98]
mov dword [ebp - 0x7e90], ebx
mov eax, dword [ebp - 0x7e9c]
test eax, eax
je 0x41a8ba
push eax
call dword [sym.imp.KERNEL32.DLL_lstrlenA]
lea edi, [eax + 1]
lea eax, [edi + edi]
call fcn.004bb0f0
mov edx, dword [ebp - 0x7e9c]
mov ebx, esp
push edi
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 edi, dword [ebp - 0x7e98]
mov eax, ebx
cmp dword [edi + 0x14], 8
jb 0x41a8c4
mov ebx, dword [edi]
jmp 0x41a8c6
mov ebx, edi
mov ecx, dword [ebp + 0x10]
mov edx, dword [ebp - 0x7e90]
push ecx
push edx
lea ecx, [ebp - 0x3f48]
push ecx
push eax
call dword [sym.imp.KERNEL32.DLL_GetCurrentThreadId]
push eax
call dword [sym.imp.KERNEL32.DLL_GetCurrentProcessId]
mov edx, dword [ebp - 0x7ea0]
mov ecx, dword [esi]
push eax
movsx eax, byte [edx + str.ENNNIWARNT]
mov edx, dword [esi + 4]
push ebx
push eax
mov eax, dword [esi + 8]
push ecx
mov ecx, dword [esi + 0xc]
push edx
mov edx, dword [esi + 0x10]
push eax
mov eax, dword [esi + 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__s__tFL:_s__d__r_n
lea ecx, [ebp - 0x7e8c]
push 0x1fa0
push ecx
call fcn.004bb11c
mov ebx, dword [ebp - 0x7ea4]
add esp, 0x44
lea edx, [ebp - 0x7e8c]
push edx
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 - 0x7e8c]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x41a955
sub eax, edx
push 0
sar eax, 1
lea ecx, [ebp - 0x7eb4]
push ecx
lea edx, [eax + eax]
push edx
lea eax, [ebp - 0x7e8c]
push eax
push ebx
call dword [sym.imp.KERNEL32.DLL_WriteFile]
push ebx
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
mov ecx, dword [edi + 0x40]
push ecx
call dword [sym.imp.KERNEL32.DLL_ReleaseMutex]
lea esp, [ebp - 0x7ec4]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004b9ff3
mov esp, ebp
pop ebp
ret 0x18