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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x500376
mov eax, dword fs:[0]
push eax
sub esp, 0x1a0
mov eax, dword [0x567e00]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 8]
mov ebx, dword [ebp + 0x14]
mov dword [ebp - 0x17c], eax
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x19c], eax
mov eax, dword [ebp + 0x18]
mov dword [ebp - 0x190], eax
mov eax, dword [ebp + 0x1c]
mov dword [ebp - 0x18c], eax
lea eax, [esi + 0x30]
mov dword [ebp - 0x188], ecx
mov dword [ebp - 0x198], ebx
mov dword [ebp - 0x194], eax
cmp ecx, dword [eax]
jg 0x412802
push 0x6400000
mov ecx, esi
call fcn.00412c40
lea eax, [esi + 0x38]
push 0xffffffffffffffff
push dword [eax]
mov dword [ebp - 0x180], eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp dword [esi + 0x2c], 8
lea eax, [esi + 0x18]
jb 0x412301
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 edi, eax
mov dword [ebp - 0x1a0], edi
cmp edi, 0xffffffff
jne 0x41233a
mov eax, dword [ebp - 0x180]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
jmp 0x412802
lea eax, [ebp - 0x184]
mov dword [ebp - 0x184], 0
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
test eax, eax
jne 0x412377
push eax
lea eax, [ebp - 0x178]
mov word [ebp - 0x174], 0xfeff
push eax
push 2
lea eax, [ebp - 0x174]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
xor eax, eax
mov dword [ebp - 0x158], 0
mov dword [ebp - 0x148], 0
mov dword [ebp - 0x144], 7
mov word [ebp - 0x158], ax
push 0x500
lea ecx, [ebp - 0x158]
mov dword [ebp - 4], eax
call fcn.00412cd0
lea eax, [ebp - 0x1ac]
push eax
call dword [sym.imp.api_ms_win_crt_time_l1_1_0.dll__time64]
mov dword [ebp - 0x1ac], eax
lea eax, [ebp - 0x1ac]
push eax
mov dword [ebp - 0x1a8], edx
call dword [sym.imp.api_ms_win_crt_time_l1_1_0.dll__localtime64]
push 0x102
mov edi, eax
lea eax, [ebp - 0x140]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0x14
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov dword [ebp - 0x174], eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
cmp dword [esi + 0x14], 8
mov dword [ebp - 0x178], eax
jb 0x41240f
mov esi, dword [esi]
push dword [ebp - 0x174]
mov ecx, dword [ebp - 0x188]
push dword [ebp - 0x178]
mov eax, dword [edi + 0x14]
push esi
movsx edx, byte [ecx + str.ENNNIWARNT]
add eax, 0x76c
mov ecx, dword [edi + 0x10]
push edx
push dword [edi]
inc ecx
push dword [edi + 4]
push dword [edi + 8]
push dword [edi + 0xc]
push ecx
push eax
push str._d__02d__02d__02d:_02d:_02d__t_c__t_s__t_08x:_08x__t
lea eax, [ebp - 0x140]
push 0x80
push eax
call fcn.00411cc0
lea ecx, [ebp - 0x140]
add esp, 0x34
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x412465
sub ecx, edx
lea eax, [ebp - 0x140]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x158]
call fcn.00403a70
push 0xc802
call fcn.004c6f7d
mov edi, eax
add esp, 4
test edi, edi
je 0x4124ac
push 0xc802
push 0
push edi
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
jmp 0x4124ae
xor edi, edi
mov dword [ebp - 0x178], edi
push dword [ebp - 0x18c]
mov byte [ebp - 4], 1
push 0
push dword [ebp - 0x190]
push 0x6400
push 0x6401
push edi
call fcn.00411c00
push dword [eax + 4]
push dword [eax]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___stdio_common_vsnwprintf_s]
mov eax, dword [ebp - 0x194]
add esp, 0x20
cmp dword [eax], 4
jg 0x41250a
mov ecx, edi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4124f4
sub ecx, edx
sar ecx, 1
push ecx
push edi
jmp 0x412716
push 1
push 0x51766c
lea ecx, [ebp - 0x158]
call fcn.004038f0
mov esi, dword [sym.imp.KERNEL32.dll_lstrlenA]
test ebx, ebx
jne 0x41252a
xor ebx, ebx
jmp 0x412557
push ebx
call esi
lea esi, [eax + 1]
lea eax, [esi + esi]
call fcn.004c7600
mov ebx, esp
xor eax, eax
push esi
push ebx
push 0xffffffffffffffff
push dword [ebp - 0x198]
mov word [ebx], ax
push eax
push eax
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov esi, dword [sym.imp.KERNEL32.dll_lstrlenA]
mov ecx, ebx
lea edx, [ecx + 2]
lea esp, [esp]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x412560
sub ecx, edx
sar ecx, 1
push ecx
push ebx
lea ecx, [ebp - 0x158]
call fcn.004038f0
push 1
push 0x517670
lea ecx, [ebp - 0x158]
call fcn.004038f0
mov ecx, edi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x412593
sub ecx, edx
sar ecx, 1
push ecx
push edi
lea ecx, [ebp - 0x158]
call fcn.004038f0
push 5
push 0x517674
lea ecx, [ebp - 0x158]
call fcn.004038f0
mov eax, dword [ebp - 0x17c]
test eax, eax
jne 0x4125cf
xor ebx, ebx
jmp 0x4125f9
push eax
call esi
lea esi, [eax + 1]
lea eax, [esi + esi]
call fcn.004c7600
mov ebx, esp
xor eax, eax
push esi
push ebx
push 0xffffffffffffffff
mov word [ebx], ax
mov eax, dword [ebp - 0x17c]
push eax
push 0
push 0
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov ecx, ebx
lea edx, [ecx + 2]
mov edi, edi
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x412600
sub ecx, edx
sar ecx, 1
push ecx
push ebx
lea ecx, [ebp - 0x158]
call fcn.004038f0
push 1
push 0x517680
lea ecx, [ebp - 0x158]
call fcn.004038f0
mov eax, dword [ebp - 0x19c]
test eax, eax
jns 0x412651
neg eax
push eax
lea eax, [ebp - 0x12]
push eax
call fcn.00411c40
lea ecx, [eax - 2]
mov eax, 0x2d
mov word [ecx], ax
jmp 0x41265d
push eax
lea eax, [ebp - 0x12]
push eax
call fcn.00411c40
mov ecx, eax
xor eax, eax
mov dword [ebp - 0x170], 0
mov word [ebp - 0x170], ax
xor edx, edx
lea eax, [ebp - 0x12]
mov dword [ebp - 0x160], edx
add esp, 8
mov esi, 7
mov dword [ebp - 0x15c], esi
cmp ecx, eax
je 0x4126aa
sub eax, ecx
sar eax, 1
push eax
push ecx
lea ecx, [ebp - 0x170]
call fcn.00403a70
mov esi, dword [ebp - 0x15c]
mov edx, dword [ebp - 0x160]
cmp esi, 8
mov byte [ebp - 4], 2
lea eax, [ebp - 0x170]
cmovae eax, dword [ebp - 0x170]
lea ecx, [ebp - 0x158]
push edx
push eax
call fcn.004038f0
mov edx, dword [ebp - 0x15c]
mov byte [ebp - 4], 1
cmp edx, 8
jb 0x41270f
mov ecx, dword [ebp - 0x170]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x412705
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4127f2
push edx
push ecx
call fcn.004c6f6f
add esp, 8
push 1
push 0x517684
lea ecx, [ebp - 0x158]
call fcn.004038f0
mov byte [ebp - 4], 0
test edi, edi
je 0x412732
push edi
call fcn.004c6f86
add esp, 4
push 2
push 0x517688
lea ecx, [ebp - 0x158]
call fcn.004038f0
cmp dword [ebp - 0x144], 8
lea eax, [ebp - 0x158]
cmovae eax, dword [ebp - 0x158]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov eax, dword [ebp - 0x148]
mov edi, dword [ebp - 0x1a0]
push 2
push 0
push 0
push edi
mov dword [ebp - 0x1a4], 0
lea esi, [eax + eax]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp dword [ebp - 0x144], 8
lea ecx, [ebp - 0x1a4]
push 0
push ecx
lea eax, [ebp - 0x158]
cmovae eax, dword [ebp - 0x158]
push esi
push eax
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x180]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov edx, dword [ebp - 0x144]
cmp edx, 8
jb 0x412802
mov ecx, dword [ebp - 0x158]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x4127f8
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x4127f8
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.004c6f6f
add esp, 8
lea esp, [ebp - 0x1bc]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004c6f8b
mov esp, ebp
pop ebp
ret 0x18