Function at 0x140031080
Capabilities:
Send data
Send data on socket
Write file on windows

Disassembly:
mov qword [rsp + 0x18], rbx
mov qword [rsp + 0x20], rbp
push rsi
push rdi
push r12
push r13
push r15
sub rsp, 0x30
xor ebx, ebx
xor r15d, r15d
xor r12d, r12d
mov esi, r8d
mov rbp, rdx
mov rdi, rcx
mov r13, rcx
test rcx, rcx
je 0x140031547
mov rax, qword [rcx + 0x58]
test rax, rax
je 0x1400310df
mov r9d, r8d
mov dword [rsp + 0x28], 1
mov r8, rdx
mov dword [rsp + 0x20], ebx
mov edx, 3
call rax
mov ebx, eax
test eax, eax
jle 0x140031549
mov qword [rsp + 0x68], r14
mov edx, 0xffffffff
mov r14d, 0xffffff53
lea r8, [0x140000000]
test ebx, ebx
js 0x1400314f1
mov rax, qword [rdi + 8]
test rax, rax
je 0x140031124
mov r9, qword [rax + 0x108]
test r9, r9
je 0x140031124
mov r8d, esi
mov rdx, rbp
mov rcx, rdi
call r9
jmp 0x140031418
movzx eax, byte [rdi + 0x80]
add eax, 0xfffffffe
cmp eax, 6
ja case.default.0x140031144
cdqe
mov ecx, dword [r8 + rax*4 + 0x31560]
add rcx, r8
jmp rcx
mov dword [rsp + 0x60], 0
test rbp, rbp
je 0x14003129d
xor r8d, r8d
lea r9, [rsp + 0x60]
test byte [rdi + 0x7c], 1
mov edx, esi
mov rcx, rbp
je 0x140031174
mov dword [rsp + 0x20], 2
jmp 0x14003117c
mov dword [rsp + 0x20], 0
call fcn.14006f6d0
cmp eax, 0xffffff36
je 0x140031197
mov edx, 0xffffffff
mov r15d, edx
mov ebx, edx
jmp case.default.0x140031144
mov eax, dword [rsp + 0x60]
test eax, eax
jne 0x1400311a9
xor r15d, r15d
xor ebx, ebx
jmp 0x14003141a
mov rcx, rax
mov rax, qword [0x1400c0348]
test rax, rax
je 0x1400311bc
call rax
jmp 0x1400311c2
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov rbx, rax
test rax, rax
jne 0x1400311d9
mov edx, 0xffffffff
mov r15d, edx
mov ebx, edx
jmp case.default.0x140031144
test byte [rdi + 0x7c], 1
lea r9, [rsp + 0x60]
mov r8, rbx
mov edx, esi
mov rcx, rbp
je 0x14003121d
mov dword [rsp + 0x20], 2
call fcn.14006f6d0
test eax, eax
jns 0x140031263
mov rax, qword [0x1400c0338]
mov rcx, rbx
test rax, rax
je 0x14003124e
call rax
mov edx, 0xffffffff
mov r15d, edx
mov ebx, edx
jmp case.default.0x140031144
mov dword [rsp + 0x20], 0
call fcn.14006f6d0
test eax, eax
jns 0x140031263
mov rax, qword [0x1400c0338]
mov rcx, rbx
test rax, rax
je 0x14003124e
call rax
mov edx, 0xffffffff
mov r15d, edx
mov ebx, edx
jmp case.default.0x140031144
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov edx, 0xffffffff
mov r15d, edx
mov ebx, edx
jmp case.default.0x140031144
test r12, r12
je 0x140031281
mov rax, qword [0x1400c0338]
mov rcx, r12
test rax, rax
je 0x14003127b
call rax
jmp 0x140031281
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov r12, rbx
mov ebx, esi
mov r15d, esi
test esi, esi
jle 0x14003141a
mov esi, dword [rsp + 0x60]
mov rbp, r12
jmp 0x14003141a
mov r15d, r14d
mov ebx, r14d
jmp case.default.0x140031144
mov r8d, esi
mov rdx, rbp
mov rcx, rdi
call fcn.140030eb0
jmp 0x140031418
mov rcx, qword [rdi]
test rcx, rcx
je 0x1400312d1
test rbp, rbp
je 0x1400312d1
test dword [rdi + 0x7c], 0x200
je 0x1400312d8
xor ebx, ebx
jmp case.default.0x140031144
test esi, esi
jne 0x1400312e6
mov ebx, 1
jmp case.default.0x140031144
mov eax, dword [rdi + 0x60]
add eax, esi
movsxd rdx, eax
call fcn.1400325c0
test eax, eax
jne 0x1400312fe
xor ebx, ebx
jmp 0x14003141a
mov rax, qword [rdi]
mov rdx, qword [rax]
test rdx, rdx
jne 0x140031310
xor ebx, ebx
jmp 0x14003141a
movsxd rcx, dword [rdi + 0x60]
add rcx, rdx
movsxd r8, esi
mov rdx, rbp
call sub.VCRUNTIME140.dll_memcpy
mov rcx, qword [rdi]
mov ebx, esi
mov rax, qword [rcx]
mov qword [rdi + 0x30], rax
mov eax, dword [rcx + 0x10]
add dword [rdi + 0x60], esi
add dword [rdi + 0x68], esi
mov dword [rdi + 0x74], eax
jmp 0x14003141a
mov r9, qword [rdi + 0x30]
test r9, r9
je 0x140031361
movsxd r8, esi
mov edx, 1
mov rcx, rbp
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
mov rbx, rax
jmp 0x14003141a
mov ebx, 0xffffff52
jmp case.default.0x140031144
cmp qword [rdi + 0x18], 0
je case.default.0x140031144
test rbp, rbp
je 0x1400312a0
mov r9, qword [rdi + 0x30]
test r9, r9
je 0x1400313e9
cmp dword [r9 + 0x240], 0
jne 0x1400313ce
cmp qword [0x1400a4458], 0
lea rax, [0x1400a4450]
je 0x1400313bf
mov ecx, dword [r9 + 0x230]
nop word [rax + rax]
cmp ecx, dword [rax]
je 0x1400313e4
add rax, 0x10
cmp qword [rax + 8], 0
jne 0x1400313b0
mov ecx, dword [r9 + 0x230]
cmp ecx, 0x357
jne 0x1400313e9
mov r8d, esi
mov rdx, rbp
mov rcx, r9
call fcn.140027d00
dec eax
neg eax
sbb ebx, ebx
jmp 0x14003141a
mov ecx, dword [rax + 4]
jmp 0x1400313c6
movsxd r8, esi
mov rdx, rbp
mov rcx, r9
call fcn.140028330
xor ebx, ebx
mov edx, 0xffffffff
cmp eax, 1
cmovne ebx, edx
jmp case.default.0x140031144
mov ecx, dword [rdi + 0x74]
xor r9d, r9d
mov r8d, esi
mov rdx, rbp
call qword [sym.imp.WS2_32.dll_send]
mov ebx, eax
mov edx, 0xffffffff
mov rdi, qword [rdi + 0x18]
test rdi, rdi
je 0x1400314f1
jmp 0x1400310ef
cmp dword [r13 + 0x78], 0
je 0x14003143f
mov ebx, edx
jmp 0x1400314f1
mov rbx, qword [rdi + 0x30]
test rbx, rbx
je 0x1400314ee
and dword [rdi + 0x7c], 0xffffffef
test rbp, rbp
je 0x14003149a
test esi, esi
js 0x14003149a
mov rax, qword [rbx + 0x530]
test rax, rax
je 0x14003147f
mov edx, 8
mov r8d, 1
mov rcx, rbx
call rax
mov dword [rbx + 0x538], 8
mov r8d, esi
mov rdx, rbp
mov rcx, rbx
call fcn.14004e070
mov r14d, eax
test eax, eax
jns 0x1400314e4
mov r14d, 0xffffffff
mov rdx, qword [rdi + 0x30]
test rdx, rdx
je 0x1400314e6
mov ecx, dword [rdx + 0x2e8]
lea eax, [rcx + 0x147]
test eax, 0xfffffffb
je 0x1400314de
cmp ecx, 0xfffffea9
je 0x1400314e6
mov eax, 0x2000
test word [rdx + 0x4e6], ax
jne 0x1400314e6
cmp ecx, 0xfffffe73
je 0x1400314e6
cmp ecx, 2
je 0x1400314de
cmp ecx, 3
jne 0x1400314e6
or dword [rdi + 0x7c], 0x10
jmp 0x1400314ee
jne 0x1400314ee
mov dword [r13 + 0x78], 1
mov ebx, r14d
mov rax, qword [r13 + 0x58]
mov r14, qword [rsp + 0x68]
test rax, rax
je 0x14003151d
mov dword [rsp + 0x28], ebx
mov r9d, esi
mov r8, rbp
mov dword [rsp + 0x20], 0
mov edx, 0x83
mov rcx, r13
call rax
mov ebx, eax
test r12, r12
je 0x14003153b
mov rax, qword [0x1400c0338]
mov rcx, r12
test rax, rax
je 0x140031535
call rax
jmp 0x14003153b
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
test r15d, r15d
jle 0x140031547
mov eax, r15d
test ebx, ebx
jg 0x140031549
mov eax, ebx
mov rbx, qword [rsp + 0x70]
mov rbp, qword [rsp + 0x78]
add rsp, 0x30
pop r15
pop r13
pop r12
pop rdi
pop rsi
ret