Function at 0x1400487b0
Capabilities:
Write file on windows

Disassembly:
mov rax, rsp
push rbp
push rdi
push r14
mov rbp, rsp
sub rsp, 0x70
mov qword [rbp - 0x28], 0xfffffffffffffffe
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
mov esi, edx
mov rbx, rcx
cmp edx, 0xffffffff
jne 0x1400487e4
xor eax, eax
cmp edx, edx
cmovne eax, edx
jmp 0x140048a28
mov rax, qword [rcx + 0x40]
mov rcx, qword [rax]
test rcx, rcx
je 0x14004881e
mov rdx, qword [rbx + 0x58]
movsxd r8, dword [rdx]
lea rax, [rcx + r8]
cmp rcx, rax
jae 0x14004881e
lea eax, [r8 - 1]
mov dword [rdx], eax
mov rcx, qword [rbx + 0x40]
mov rdx, qword [rcx]
lea rax, [rdx + 1]
mov qword [rcx], rax
mov byte [rdx], sil
mov eax, esi
jmp 0x140048a28
cmp qword [rbx + 0x80], 0
jne 0x140048830
or eax, 0xffffffff
jmp 0x140048a28
mov r8, qword [rbx + 0x18]
lea rax, [rbx + 0x70]
cmp qword [r8], rax
jne 0x14004885d
mov rdx, qword [rbx + 0x90]
mov rcx, qword [rbx + 0x88]
mov qword [r8], rcx
mov rax, qword [rbx + 0x38]
mov qword [rax], rcx
sub edx, ecx
mov rax, qword [rbx + 0x50]
mov dword [rax], edx
cmp qword [rbx + 0x68], 0
jne 0x140048882
movsx ecx, sil
mov rdx, qword [rbx + 0x80]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fputc]
or ebx, 0xffffffff
cmp eax, ebx
cmovne ebx, esi
jmp 0x140048a26
mov byte [rbp - 0x30], sil
mov edx, reloc.WS2_32.dll_ntohs
mov qword [rbp - 8], rdx
mov byte [rbp - 0x20], 0
xor ecx, ecx
mov qword [rbp - 0x20], rcx
mov qword [rbp - 0x10], 8
lea rax, [rbp - 0x20]
cmp rdx, 0x10
cmovae rax, rcx
mov byte [rax + 8], cl
mov r8, qword [rbp - 0x20]
mov r9, qword [rbp - 8]
nop dword [rax + rax]
lea rcx, [rbp - 0x20]
cmp r9, 0x10
cmovae rcx, r8
lea rdx, [rbp - 0x20]
cmovae rdx, r8
add rcx, qword [rbp - 0x10]
lea rax, [rbp + 0x30]
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], rcx
mov qword [rsp + 0x28], rdx
lea rax, [rbp + 0x38]
mov qword [rsp + 0x20], rax
lea r9, [rbp - 0x2f]
lea r8, [rbp - 0x30]
lea rdx, [rbx + 0x74]
mov rcx, qword [rbx + 0x68]
call qword [sym.imp.MSVCP140.dll_public:_int___cdecl_std::codecvt_char__char__struct__Mbstatet_::out_struct__Mbstatet____ptr64__char_const____ptr64__char_const____ptr64__char_const____ptr64____ptr64__char____ptr64__char____ptr64__char____ptr64____ptr64_const___ptr64]
test eax, eax
js 0x1400489c4
cmp eax, 1
jg 0x14004899c
lea rax, [rbp - 0x20]
mov r8, qword [rbp - 0x20]
mov r9, qword [rbp - 8]
cmp r9, 0x10
cmovae rax, r8
mov rdi, qword [rbp + 0x30]
sub rdi, rax
je 0x140048966
lea rcx, [rbp - 0x20]
cmp r9, 0x10
cmovae rcx, r8
mov r9, qword [rbx + 0x80]
mov r8, rdi
mov edx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
mov r9, qword [rbp - 8]
mov r8, qword [rbp - 0x20]
cmp rdi, rax
jne 0x1400489cc
mov byte [rbx + 0x71], 1
lea rax, [rbp - 0x30]
cmp qword [rbp + 0x38], rax
jne 0x140048998
test rdi, rdi
jne 0x1400488c0
cmp qword [rbp - 0x10], 0x20
jae 0x1400489cc
xor r8d, r8d
lea edx, [rdi + 8]
lea rcx, [rbp - 0x20]
call fcn.140049920
jmp 0x1400488b0
mov ebx, esi
jmp 0x1400489cf
cmp eax, 3
jne 0x1400489c4
movsx ecx, byte [rbp - 0x30]
mov rdx, qword [rbx + 0x80]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fputc]
or ebx, 0xffffffff
cmp eax, ebx
cmovne ebx, esi
mov r9, qword [rbp - 8]
mov r8, qword [rbp - 0x20]
jmp 0x1400489cf
mov r9, qword [rbp - 8]
mov r8, qword [rbp - 0x20]
or ebx, 0xffffffff
cmp r9, 0x10
jb 0x140048a26
lea rax, [r9 + 1]
cmp rax, 0x1000
jb 0x140048a1e
test byte [rbp - 0x20], 0x1f
je 0x1400489ee
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
mov rax, qword [r8 - 8]
cmp rax, r8
jb 0x1400489fe
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
sub r8, rax
cmp r8, 8
jae 0x140048a0e
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
cmp r8, 0x27
jbe 0x140048a1b
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
mov r8, rax
mov rcx, r8
call fcn.140054a50
mov eax, ebx
lea r11, [rsp + 0x70]
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rsp, r11
pop r14
pop rdi
pop rbp
ret