Function at 0x422b00
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5c84a8
mov eax, dword fs:[0]
push eax
sub esp, 0x38
mov eax, dword [0x671330]
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 ebx, ecx
call fcn.0040fd50
mov dword [ebp - 0x30], eax
lea eax, [ebp + 8]
push eax
lea eax, [ebp - 0x30]
push eax
call fcn.00415ba0
add esp, 8
test al, al
je 0x422b5a
lea eax, [ebp + 8]
push eax
call fcn.00415950
add esp, 4
jmp 0x422d2a
mov ecx, ebx
call dword [sym.imp.MSVCP140.dll_protected:_char____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::pptr_void_const]
test eax, eax
je 0x422b9c
mov ecx, ebx
call dword [sym.imp.MSVCP140.dll_protected:_char____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::epptr_void_const]
mov ecx, ebx
mov esi, eax
call dword [sym.imp.MSVCP140.dll_protected:_char____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::pptr_void_const]
cmp eax, esi
jae 0x422b9c
mov ecx, ebx
call dword [sym.imp.MSVCP140.dll_protected:_char____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::_Pninc_void_]
mov esi, eax
lea eax, [ebp + 8]
push eax
call fcn.00415b90
mov byte [esi], al
add esp, 4
mov eax, dword [ebp + 8]
jmp 0x422d2a
cmp dword [ebx + 0x4c], 0
jne 0x422bac
call fcn.0040fd50
jmp 0x422d2a
mov ecx, ebx
call dword [sym.imp.MSVCP140.dll_protected:_char____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::eback_void_const]
lea ecx, [ebx + 0x3c]
cmp eax, ecx
jne 0x422bcb
push dword [ebx + 0x54]
mov eax, dword [ebx + 0x50]
mov ecx, ebx
push eax
push eax
call dword [sym.imp.MSVCP140.dll_protected:_void___thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::setg_char___char___char__]
cmp dword [ebx + 0x38], 0
lea eax, [ebp + 8]
push eax
jne 0x422bf8
mov esi, dword [ebx + 0x4c]
call fcn.00415b90
movsx eax, al
push esi
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fputc]
add esp, 0xc
cmp eax, 0xffffffff
je 0x422ba2
mov eax, dword [ebp + 8]
jmp 0x422d2a
call fcn.00415b90
add esp, 4
mov byte [ebp - 0x11], al
lea ecx, [ebp - 0x2c]
push 0
push 8
call fcn.00413e40
lea eax, [ebp - 0x38]
mov dword [ebp - 4], 0
push eax
lea ecx, [ebp - 0x2c]
call fcn.00420b60
lea ecx, [ebp - 0x2c]
mov edi, dword [eax]
lea eax, [ebp - 0x3c]
push eax
call fcn.00420b60
lea ecx, [ebp - 0x2c]
mov esi, dword [eax]
lea eax, [ebp - 0x34]
push eax
call fcn.004087a0
mov ecx, dword [ebx + 0x38]
add eax, edi
push eax
push esi
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x11]
push eax
lea eax, [ebx + 0x40]
push eax
call dword [sym.imp.MSVCP140.dll_public:_int___thiscall_std::codecvt_char__char__struct__Mbstatet_::out_struct__Mbstatet___char_const___char_const___char_const____char___char___char___const]
test eax, eax
js 0x422d19
cmp eax, 1
jg 0x422d48
lea eax, [ebp - 0x40]
push eax
lea ecx, [ebp - 0x2c]
call fcn.00420b60
mov esi, dword [ebp - 0x34]
sub esi, dword [eax]
je 0x422ca0
lea eax, [ebp - 0x44]
push eax
lea ecx, [ebp - 0x2c]
call fcn.00420b60
push dword [ebx + 0x4c]
push esi
push 1
push dword [eax]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
cmp esi, eax
jne 0x422d19
lea eax, [ebp - 0x11]
mov byte [ebx + 0x3d], 1
cmp dword [ebp - 0x30], eax
jne 0x422d63
test esi, esi
jne 0x422ccc
lea ecx, [ebp - 0x2c]
call fcn.004087a0
cmp eax, 0x20
jae 0x422d19
push esi
push 8
lea ecx, [ebp - 0x2c]
call fcn.00413f40
lea eax, [ebp - 0x38]
push eax
lea ecx, [ebp - 0x2c]
call fcn.00420b60
lea ecx, [ebp - 0x2c]
mov edi, dword [eax]
lea eax, [ebp - 0x3c]
push eax
call fcn.00420b60
lea ecx, [ebp - 0x2c]
mov esi, dword [eax]
lea eax, [ebp - 0x34]
push eax
call fcn.004087a0
mov ecx, dword [ebx + 0x38]
add eax, edi
push eax
push esi
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x11]
push eax
lea eax, [ebx + 0x40]
push eax
call dword [sym.imp.MSVCP140.dll_public:_int___thiscall_std::codecvt_char__char__struct__Mbstatet_::out_struct__Mbstatet___char_const___char_const___char_const____char___char___char___const]
test eax, eax
jns 0x422c63
call fcn.0040fd50
mov esi, eax
lea ecx, [ebp - 0x2c]
call fcn.0040b3b0
mov eax, esi
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.00544286
mov esp, ebp
pop ebp
ret 4
cmp eax, 3
jne 0x422d19
push dword [ebx + 0x4c]
movsx eax, byte [ebp - 0x11]
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fputc]
add esp, 8
cmp eax, 0xffffffff
je 0x422d19
mov esi, dword [ebp + 8]
jmp 0x422d20