Function at 0x402cf0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
lea ebx, [ebp - 0x60c]
sub esp, 0x66c
mov eax, dword [ebp + 0x1c]
mov edx, dword [ebp + 0x18]
mov ecx, dword [ebp + 0x20]
mov edi, dword [ebp + 0x14]
mov esi, dword [ebp + 8]
mov dword [ebp - 0x614], 0
mov dword [ebp - 0x640], eax
mov dword [ebp - 0x628], eax
mov dword [esp + 0x14], eax
mov eax, dword [ebp - 0x624]
mov dword [ebp - 0x644], edx
mov dword [ebp - 0x62c], edx
mov dword [esp + 0x10], edx
mov edx, dword [ebp + 0x10]
mov dword [esp + 0x18], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x63c], ecx
lea ecx, [ebp - 0x61c]
mov dword [ebp - 0x648], edi
mov dword [ebp - method.fmt::v7::basic_memory_buffer_char__500u__std::allocator_char___.grow_unsigned_int_], 0x87666c
mov dword [ebp - 0x618], ebx
mov dword [ebp - 0x610], 0x1f4
mov dword [ebp - 0x630], edi
mov dword [esp + 0x1c], 0
mov dword [esp + 0xc], edi
mov dword [esp + 4], eax
mov dword [esp + 8], edx
mov dword [esp], ecx
call sym.__ZN3fmt2v710vformat_toINS0_6detail13arg_formatterINS2_15buffer_appenderIcEEcEEcNS0_20basic_format_contextIS5_cEEEENT1_8iterat
mov dword [esp], esi
call dword [sym.imp.msvcrt.dll__fileno_1]
mov dword [ebp - 0x64c], eax
mov dword [esp], eax
call dword [sym.imp.msvcrt.dll__isatty]
test eax, eax
mov edx, dword [ebp - 0x618]
mov edi, dword [ebp - 0x614]
je 0x402e80
lea ecx, [ebp - 0x414]
mov dword [esp], edx
mov dword [esp + 4], edi
call method.fmt::v7::detail::utf8_to_utf16.utf8_to_utf16_fmt::v7::basic_string_view_char__
mov esi, dword [ebp - 0x40c]
mov eax, dword [ebp - 0x64c]
sub esp, 8
mov dword [ebp - 0x634], 0
mov edi, dword [ebp - 0x410]
sub esi, 1
mov dword [esp], eax
call dword [sym.imp.msvcrt.dll__get_osfhandle]
lea edx, [ebp - 0x634]
mov dword [esp + 0x10], 0
mov dword [esp + 8], esi
mov dword [esp + 4], edi
mov dword [esp], eax
mov dword [esp + 0xc], edx
call dword [sym.imp.KERNEL32.dll_WriteConsoleW]
sub esp, 0x14
test eax, eax
je 0x402ee7
mov eax, dword [ebp - 0x410]
lea edx, [ebp - 0x404]
mov dword [ebp - method.fmt::v7::basic_memory_buffer_wchar_t__500u__std::allocator_wchar_t___.grow_unsigned_int_], 0x876684
cmp eax, edx
je 0x402e52
mov dword [esp], eax
call sym.operator_delete_void_
mov eax, dword [ebp - 0x618]
mov dword [ebp - method.fmt::v7::basic_memory_buffer_char__500u__std::allocator_char___.grow_unsigned_int_], 0x87666c
cmp eax, ebx
je 0x402e6e
mov dword [esp], eax
call sym.operator_delete_void_
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 0xc], esi
mov dword [esp + 8], edi
mov dword [esp + 4], 1
mov dword [esp], edx
call sym._fwrite
cmp eax, edi
jae 0x402e52
mov dword [esp], 0xc
call sym.___cxa_allocate_exception
mov edi, eax
call dword [sym.imp.msvcrt.dll__errno]
mov dword [esp + 4], str.cannot_write_to_file
mov dword [esp + 8], 0x14
mov ecx, edi
mov eax, dword [eax]
mov dword [esp], eax
call method.fmt::v7::system_error.system_error___int__fmt::v7::basic_string_view_char__
sub esp, 0xc
mov dword [esp + 8], method.fmt::v7::system_error.system_error__
mov dword [esp + 4], 0x8717f0
mov dword [esp], edi
call sym.___cxa_throw
mov dword [esp], 8
call sym.___cxa_allocate_exception
mov dword [esp], str.failed_to_write_to_console
mov ecx, eax
mov edi, eax
call method.std::runtime_error.runtime_error_char_const_
push eax
mov dword [edi], method.fmt::v7::format_error.format_error__
mov dword [esp + 8], method.fmt::v7::format_error.format_error__
mov dword [esp + 4], 0x8717e4
mov dword [esp], edi
call sym.___cxa_throw
mov esi, eax
mov eax, dword [ebp - 0x618]
mov dword [ebp - method.fmt::v7::basic_memory_buffer_char__500u__std::allocator_char___.grow_unsigned_int_], 0x87666c
cmp eax, ebx
je 0x402f40
mov dword [esp], eax
call sym.operator_delete_void_
mov dword [esp], esi
call sym.__Unwind_Resume
mov esi, eax
mov eax, dword [ebp - 0x410]
lea edx, [ebp - 0x404]
mov dword [ebp - method.fmt::v7::basic_memory_buffer_wchar_t__500u__std::allocator_wchar_t___.grow_unsigned_int_], 0x876684
cmp eax, edx
je 0x402f24
mov dword [esp], eax
call sym.operator_delete_void_
jmp 0x402f24