Function at 0x140052570
Capabilities:
Write file on windows

Disassembly:
mov dword [rsp + 0x20], r9d
mov dword [rsp + 0x18], r8d
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rbp
push rdi
sub rsp, 0x128
lea rbp, [rsp + 0x20]
lea rdi, [rsp + 0x20]
mov ecx, reloc.WS2_32.dll_select
mov eax, 0xcccccccc
rep stosd dword [rdi], eax
mov rcx, qword [rsp + 0x148]
mov rax, qword [0x14009f088]
xor rax, rbp
mov qword [rbp + 0xf0], rax
lea rcx, [0x1401a5341]
call fcn.14006b9e0
cmp qword [rbp + 0x120], 0
je 0x1400525df
mov rax, qword [rbp + 0x120]
cmp qword [rax], 0
jne 0x1400525e4
jmp 0x1400529ee
mov rax, qword [rbp + 0x120]
cmp dword [rax + 0x11c], 1
jne 0x140052755
mov eax, dword [rbp + 0x140]
shr eax, 0x18
mov ecx, 1
imul rcx, rcx, 0
mov byte [rbp + rcx + 8], al
mov eax, dword [rbp + 0x140]
shr eax, 0x10
mov ecx, 1
imul rcx, rcx, 1
mov byte [rbp + rcx + 8], al
mov eax, dword [rbp + 0x140]
shr eax, 8
mov ecx, 1
imul rcx, rcx, 2
mov byte [rbp + rcx + 8], al
mov eax, 1
imul rax, rax, 3
movzx ecx, byte [rbp + 0x140]
mov byte [rbp + rax + 8], cl
mov eax, dword [rbp + 0x148]
shr eax, 0x18
mov ecx, 1
imul rcx, rcx, 4
mov byte [rbp + rcx + 8], al
mov eax, dword [rbp + 0x148]
shr eax, 0x10
mov ecx, 1
imul rcx, rcx, 5
mov byte [rbp + rcx + 8], al
mov eax, dword [rbp + 0x148]
shr eax, 8
mov ecx, 1
imul rcx, rcx, 6
mov byte [rbp + rcx + 8], al
mov eax, 1
imul rax, rax, 7
movzx ecx, byte [rbp + 0x148]
mov byte [rbp + rax + 8], cl
mov eax, dword [rbp + 0x130]
shr eax, 0x18
mov ecx, 1
imul rcx, rcx, 8
mov byte [rbp + rcx + 8], al
mov eax, dword [rbp + 0x130]
shr eax, 0x10
mov ecx, 1
imul rcx, rcx, 9
mov byte [rbp + rcx + 8], al
mov eax, dword [rbp + 0x130]
shr eax, 8
mov ecx, 1
imul rcx, rcx, 0xa
mov byte [rbp + rcx + 8], al
mov eax, 1
imul rax, rax, 0xb
movzx ecx, byte [rbp + 0x130]
mov byte [rbp + rax + 8], cl
mov eax, dword [rbp + 0x138]
shr eax, 0x18
mov ecx, 1
imul rcx, rcx, 0xc
mov byte [rbp + rcx + 8], al
mov eax, dword [rbp + 0x138]
shr eax, 0x10
mov ecx, 1
imul rcx, rcx, 0xd
mov byte [rbp + rcx + 8], al
mov eax, dword [rbp + 0x138]
shr eax, 8
mov ecx, 1
imul rcx, rcx, 0xe
mov byte [rbp + rcx + 8], al
mov eax, 1
imul rax, rax, 0xf
movzx ecx, byte [rbp + 0x138]
mov byte [rbp + rax + 8], cl
jmp 0x1400528ad
mov eax, 1
imul rax, rax, 0
movzx ecx, byte [rbp + 0x140]
mov byte [rbp + rax + 8], cl
mov eax, dword [rbp + 0x140]
shr eax, 8
mov ecx, 1
imul rcx, rcx, 1
mov byte [rbp + rcx + 8], al
mov eax, dword [rbp + 0x140]
shr eax, 0x10
mov ecx, 1
imul rcx, rcx, 2
mov byte [rbp + rcx + 8], al
mov eax, dword [rbp + 0x140]
shr eax, 0x18
mov ecx, 1
imul rcx, rcx, 3
mov byte [rbp + rcx + 8], al
mov eax, 1
imul rax, rax, 4
movzx ecx, byte [rbp + 0x148]
mov byte [rbp + rax + 8], cl
mov eax, dword [rbp + 0x148]
shr eax, 8
mov ecx, 1
imul rcx, rcx, 5
mov byte [rbp + rcx + 8], al
mov eax, dword [rbp + 0x148]
shr eax, 0x10
mov ecx, 1
imul rcx, rcx, 6
mov byte [rbp + rcx + 8], al
mov eax, dword [rbp + 0x148]
shr eax, 0x18
mov ecx, 1
imul rcx, rcx, 7
mov byte [rbp + rcx + 8], al
mov eax, 1
imul rax, rax, 8
movzx ecx, byte [rbp + 0x130]
mov byte [rbp + rax + 8], cl
mov eax, dword [rbp + 0x130]
shr eax, 8
mov ecx, 1
imul rcx, rcx, 9
mov byte [rbp + rcx + 8], al
mov eax, dword [rbp + 0x130]
shr eax, 0x10
mov ecx, 1
imul rcx, rcx, 0xa
mov byte [rbp + rcx + 8], al
mov eax, dword [rbp + 0x130]
shr eax, 0x18
mov ecx, 1
imul rcx, rcx, 0xb
mov byte [rbp + rcx + 8], al
mov eax, 1
imul rax, rax, 0xc
movzx ecx, byte [rbp + 0x138]
mov byte [rbp + rax + 8], cl
mov eax, dword [rbp + 0x138]
shr eax, 8
mov ecx, 1
imul rcx, rcx, 0xd
mov byte [rbp + rcx + 8], al
mov eax, dword [rbp + 0x138]
shr eax, 0x10
mov ecx, 1
imul rcx, rcx, 0xe
mov byte [rbp + rcx + 8], al
mov eax, dword [rbp + 0x138]
shr eax, 0x18
mov ecx, 1
imul rcx, rcx, 0xf
mov byte [rbp + rcx + 8], al
mov rax, qword [rbp + 0x120]
mov r9, qword [rax]
mov r8d, reloc.WS2_32.dll_recv
mov edx, 1
lea rcx, [rbp + 8]
call qword [sym.imp.ucrtbased.dll_fwrite]
cmp rax, 0x10
je 0x140052948
mov rax, qword [rbp + 0x120]
add rax, 0x1c
mov qword [rbp + 0xe8], rax
mov ecx, 2
call qword [sym.imp.ucrtbased.dll___acrt_iob_func]
mov rcx, qword [rbp + 0x120]
mov r9, qword [rcx + 0x128]
mov rcx, qword [rbp + 0xe8]
mov r8, rcx
lea rdx, str._s:_lld:_could_not_write_packet_header_n
mov rcx, rax
call fcn.140001b10
mov rax, qword [rbp + 0x120]
add rax, 0x1c
mov rcx, rax
call qword [sym.imp.ucrtbased.dll_perror]
mov rax, qword [rbp + 0x120]
mov rcx, qword [rax]
call qword [sym.imp.ucrtbased.dll_fclose]
mov rax, qword [rbp + 0x120]
mov qword [rax], 0
mov eax, dword [rbp + 0x130]
mov rcx, qword [rbp + 0x120]
mov r9, qword [rcx]
mov r8d, eax
mov edx, 1
mov rcx, qword [rbp + 0x128]
call qword [sym.imp.ucrtbased.dll_fwrite]
mov ecx, dword [rbp + 0x130]
cmp rax, rcx
je 0x1400529ee
mov rax, qword [rbp + 0x120]
add rax, 0x1c
mov qword [rbp + 0xe8], rax
mov ecx, 2
call qword [sym.imp.ucrtbased.dll___acrt_iob_func]
mov rcx, qword [rbp + 0x120]
mov r9, qword [rcx + 0x128]
mov rcx, qword [rbp + 0xe8]
mov r8, rcx
lea rdx, str._s:_lld:_could_not_write_packet_contents_n
mov rcx, rax
call fcn.140001b10
mov rax, qword [rbp + 0x120]
add rax, 0x1c
mov rcx, rax
call qword [sym.imp.ucrtbased.dll_perror]
mov rax, qword [rbp + 0x120]
mov rcx, qword [rax]
call qword [sym.imp.ucrtbased.dll_fclose]
mov rax, qword [rbp + 0x120]
mov qword [rax], 0
lea rcx, [rbp - 0x20]
lea rdx, [0x14008d900]
call fcn.14006b950
mov rcx, qword [rbp + 0xf0]
xor rcx, rbp
call fcn.14006bb70
lea rsp, [rbp + 0x108]
pop rdi
pop rbp
ret