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

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x18cc
call fcn.0041a2b0
mov eax, dword [0x42807c]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [ebp + 0x14]
push esi
mov esi, dword [ebp + 0x10]
push edi
mov dword [ebp - 0x18b8], eax
mov dword [ebp - 0x18b0], ecx
mov dword [ebp - 0x18b4], edx
cmp eax, dword [0x42abe0]
jg 0x402ae2
call fcn.00402b00
xor eax, eax
push 0x1000
push eax
lea ecx, [ebp - 0x18a2]
push ecx
mov word [ebp - 0x18a4], ax
call fcn.00412f10
push ebx
push esi
lea edx, [ebp - 0x18a4]
push 0x800
push edx
call fcn.0040fa13
mov eax, dword [0x42abe8]
add esp, 0x1c
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, dword [0x42abc4]
mov ebx, 8
cmp dword [0x42abd8], ebx
jae 0x40284c
mov eax, 0x42abc4
push 0
push 0x80
push 4
push 0
push 1
push 0xc0000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
mov dword [ebp - 0x18a8], edi
cmp edi, 0xffffffff
je 0x402ad5
lea ecx, [ebp - 0x18c4]
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
test eax, eax
jne 0x4028a9
push eax
lea edx, [ebp - 0x18cc]
push edx
push 2
lea eax, [ebp - 0x18ac]
push eax
push edi
mov word [ebp - 0x18ac], 0xfeff
call dword [sym.imp.KERNEL32.dll_WriteFile]
lea ecx, [ebp - 0x18c0]
push ecx
call fcn.0040fcdf
mov dword [ebp - 0x18bc], edx
lea edx, [ebp - 0x18c0]
push edx
mov dword [ebp - 0x18c0], eax
call fcn.0040fcb8
mov esi, eax
xor eax, eax
push 0x898
push eax
lea ecx, [ebp - 0x89e]
push ecx
mov word [ebp - 0x8a0], ax
call fcn.00412f10
add esp, 0x14
cmp dword [0x42abe0], 4
jg 0x402969
cmp dword [0x42abbc], ebx
mov ebx, dword [0x42aba8]
jae 0x402909
mov ebx, 0x42aba8
lea edx, [ebp - 0x18a4]
push edx
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov edx, dword [esi]
push eax
mov eax, dword [ebp - 0x18b8]
movsx ecx, byte [eax + str.ENNNIWARNT]
mov eax, dword [esi + 4]
push ebx
push ecx
mov ecx, dword [esi + 8]
push edx
mov edx, dword [esi + 0xc]
push eax
mov eax, dword [esi + 0x10]
push ecx
mov ecx, dword [esi + 0x14]
push edx
inc eax
push eax
add ecx, 0x76c
push ecx
push str._d__02d__02d__02d:_02d:_02d__t_c__t_s__t_08x:_08x__t_s_r_n
lea edx, [ebp - 0x8a0]
push 0x44c
push edx
call fcn.0040f2ed
add esp, 0x38
jmp 0x402a81
mov eax, dword [ebp - 0x18b0]
test eax, eax
jne 0x40297b
mov dword [ebp - 0x18b0], eax
jmp 0x4029b3
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea edi, [eax + 1]
lea eax, [edi + edi]
call fcn.00419fc0
mov ecx, dword [ebp - 0x18b0]
mov ebx, esp
push edi
push ebx
push 0xffffffffffffffff
xor eax, eax
push ecx
push eax
push eax
mov word [ebx], ax
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov edi, dword [ebp - 0x18a8]
mov dword [ebp - 0x18b0], ebx
mov eax, dword [ebp - 0x18b4]
test eax, eax
jne 0x4029c1
xor ebx, ebx
jmp 0x4029f3
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea edi, [eax + 1]
lea eax, [edi + edi]
call fcn.00419fc0
mov eax, dword [ebp - 0x18b4]
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 - 0x18a8]
cmp dword [0x42abbc], 8
jb 0x402a0a
mov ecx, dword [0x42aba8]
mov dword [ebp - 0x18a8], ecx
jmp 0x402a14
mov dword [ebp - 0x18a8], 0x42aba8
mov edx, dword [ebp + 0xc]
mov eax, dword [ebp - 0x18b0]
push edx
push eax
lea ecx, [ebp - 0x18a4]
push ecx
push ebx
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov edx, dword [ebp - 0x18a8]
push eax
mov eax, dword [ebp - 0x18b8]
movsx ecx, byte [eax + str.ENNNIWARNT]
mov eax, dword [esi + 4]
push edx
mov edx, dword [esi]
push ecx
mov ecx, dword [esi + 8]
push edx
mov edx, dword [esi + 0xc]
push eax
mov eax, dword [esi + 0x10]
push ecx
mov ecx, dword [esi + 0x14]
push edx
inc eax
push eax
add ecx, 0x76c
push ecx
push str._d__02d__02d__02d:_02d:_02d__t_c__t_s__t_08x:_08x__t__s__s__tFL:_s__d__r_n
lea edx, [ebp - 0x8a0]
push 0x44c
push edx
call fcn.0040f2ed
add esp, 0x44
lea eax, [ebp - 0x8a0]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
push 2
push 0
push 0
push edi
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 0x402aa4
sub eax, edx
push 0
sar eax, 1
lea ecx, [ebp - 0x18c8]
push ecx
lea edx, [eax + eax]
push edx
lea eax, [ebp - 0x8a0]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [0x42abe8]
push ecx
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.0040ed5d
mov esp, ebp
pop ebp
ret 0x10