Function at 0x4a9260
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0x430
lea edi, [ebp + 0xc]
mov ebx, dword [ebp + 8]
push ebx
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__fileno]
add esp, 4
mov esi, eax
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__isatty]
add esp, 4
test eax, eax
je 0x4a931a
push ebx
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fflush
add esp, 4
mov eax, edi
mov edi, dword [edi]
mov ebx, dword [eax + 4]
lea eax, [esp + 0x30]
push 0x3f8
push 0
push eax
call sub.api_ms_win_crt_string_l1_1_0.dll_memset
add esp, 0xc
mov dword [esp + 0x14], ebx
mov dword [esp + 4], edi
mov dword [esp + 0x10], edi
sub esp, 8
movsd xmm0, qword [esp + 0x18]
movsd qword [esp], xmm0
lea ecx, [esp + 0x38]
call fcn.004a8ed0
push esi
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__get_osfhandle]
add esp, 4
mov ecx, dword [esp + 0x38]
dec ecx
push 0
push 0
push ecx
push dword [esp + 0x40]
push eax
call dword [sym.imp.KERNEL32.dll_WriteConsoleW]
mov esi, eax
mov eax, dword [esp + 0x34]
lea ecx, [esp + 0x40]
cmp eax, ecx
je 0x4a9310
push eax
call fcn.004203b0
add esp, 4
test esi, esi
jne 0x4a9332
mov eax, dword [esp + 4]
jmp 0x4a931f
mov eax, dword [edi]
mov ebx, dword [edi + 4]
push dword [ebp + 8]
push ebx
push 1
push eax
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fwrite
add esp, 0x10
cmp eax, ebx
jb 0x4a933a
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov eax, dword [eax]
mov dword [esp + 8], str.cannot_write_to_file
mov dword [esp + 0xc], 0x14
mov dword [esp + 0x34], 0
mov dword [esp + 0x30], 0
lea ecx, [esp + 0x10]
mov dword [esp + 0x38], ecx
sub esp, 0x20
movups xmm0, xmmword [esp + 0x50]
movups xmmword [esp + 0x10], xmm0
movsd xmm0, qword [esp + 0x28]
movsd qword [esp + 8], xmm0
mov dword [esp + 4], eax
lea esi, [esp + 0x40]
mov dword [esp], esi
call fcn.004a8c30
add esp, 0x20
mov ecx, esi
call fcn.0049c060
mov esi, eax
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
sub esp, 0x10
mov dword [esp + 0x10], esi
mov dword [esp], eax
mov dword [esp + 0xc], 0x4f
mov dword [esp + 8], str.external_fmtlib_include_fmt_format_inl.h
call fcn.004a8720
add esp, 0x14
call fcn.0049a9b0
nop
push edi
push esi
sub esp, 0x238
mov esi, dword [esp + 0x244]
lea eax, [esp + 0x3c]
mov dword [esp], eax
mov dword [esp + 8], 0x1fc
mov dword [esp + 4], 0
call sub.api_ms_win_crt_string_l1_1_0.dll_memset
mov dword [esp + 0x34], 0x589e7c
lea edi, [esp + 0x44]
mov dword [esp + 0x38], edi
mov dword [esp + 0x40], 0x1f4
mov eax, dword [esp + 0x248]
mov ecx, dword [esp + 0x24c]
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x28], eax
mov dword [esp + 0x30], 0
movups xmm0, xmmword [esp + 0x250]
movups xmmword [esp + 0xc], xmm0
movsd xmm0, qword [esp + 0x28]
movsd qword [esp + 4], xmm0
lea eax, [esp + 0x34]
mov dword [esp], eax
mov dword [esp + 0x1c], 0
call fcn.004a9dd0
mov eax, dword [esp + 0x38]
mov ecx, dword [esp + 0x3c]
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], ecx
movsd xmm0, qword [esp + 0x20]
movsd qword [esp + 4], xmm0
mov dword [esp], esi
call fcn.004a9260
mov eax, dword [esp + 0x38]
cmp eax, edi
je 0x4a9492
mov dword [esp], eax
call fcn.004203b0
add esp, 0x238
pop esi
pop edi
ret