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

Disassembly:
mov qword [rsp + 0x18], rbx
mov qword [rsp + 0x20], rbp
push rsi
sub rsp, 0x40
mov eax, dword [rcx + 0x68]
mov rsi, r8
mov rbp, rdx
mov rbx, rcx
bt eax, 0x1a
jae 0x140049459
mov rax, qword gs:[0x58]
mov edx, 0x2fe0
mov rcx, qword [rax]
mov rax, qword [rdx + rcx]
test rax, rax
jne 0x140049440
call fcn.140174cc4
mov dword [rax], 0x2746
or eax, 0xffffffff
mov rbx, qword [rsp + 0x60]
mov rbp, qword [rsp + 0x68]
add rsp, 0x40
pop rsi
ret
cmp word [rcx + 0x6c], 0
je 0x140049482
movsxd rcx, dword [rcx + 0x70]
call qword [sym.imp.WS2_32.dll_send]
movsxd rcx, eax
call fcn.140170a40
mov rbx, qword [rsp + 0x60]
mov rbp, qword [rsp + 0x68]
add rsp, 0x40
pop rsi
ret
test al, al
js 0x1400494f8
mov qword [rsp + 0x58], rdi
and eax, 0x3000
or edi, 0xffffffff
cmp eax, 0x3000
jne 0x1400494b6
nop word [rax + rax]
mov edx, 1
mov ecx, edi
call qword [sym.imp.KERNEL32.dll_SleepEx]
test dword [rbx + 0x68], 0x2000
jne 0x1400494a0
movsxd rcx, dword [rbx + 0x70]
lea r9, [rsp + 0x50]
xor eax, eax
mov r8d, esi
mov rdx, rbp
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_WriteFile]
movsxd rcx, eax
call fcn.140170a40
test eax, eax
cmovne edi, dword [rsp + 0x50]
mov eax, edi
mov rdi, qword [rsp + 0x58]
mov rbx, qword [rsp + 0x60]
mov rbp, qword [rsp + 0x68]
add rsp, 0x40
pop rsi
ret
bt eax, 0xd
jae 0x140049536
mov rax, qword gs:[0x58]
mov edx, 0x2fe0
mov rcx, qword [rax]
mov rax, qword [rdx + rcx]
test rax, rax
jne 0x14004951d
call fcn.140174cc4
mov dword [rax], 0x2733
or eax, 0xffffffff
mov rbx, qword [rsp + 0x60]
mov rbp, qword [rsp + 0x68]
add rsp, 0x40
pop rsi
ret
mov rcx, qword [rcx + 0x88]
call fcn.14004e470
mov eax, dword [rbx + 0x68]
btr eax, 0xf
bts eax, 0xd
mov dword [rbx + 0x68], eax
xor ecx, ecx
mov rax, qword [rbx + 0x140]
mov qword [rax], rcx
mov qword [rax + 8], rcx
mov qword [rax + 0x10], rcx
mov qword [rax + 0x18], rcx
mov rax, qword [rbx + 0x140]
mov qword [rax + 0x18], rbx
lock inc dword [rbx + 0x120]
mov rcx, qword [rbx + 0x88]
lea r8, [rsp + 0x30]
lea rdx, [rsp + 0x38]
call fcn.14004e2d0
mov rcx, rbx
call fcn.14004a4b0
movsxd rcx, dword [rbx + 0x70]
lea rax, [0x140042ed0]
mov r9, qword [rbx + 0x140]
mov r8d, dword [rsp + 0x30]
mov rdx, qword [rsp + 0x38]
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_WriteFileEx]
movsxd rcx, eax
call fcn.140170a40
test eax, eax
je 0x1400495dd
mov eax, esi
mov rbx, qword [rsp + 0x60]
mov rbp, qword [rsp + 0x68]
add rsp, 0x40
pop rsi
ret
mov rax, qword gs:[0x58]
mov edx, 0x2fe0
mov rcx, qword [rax]
mov rax, qword [rdx + rcx]
test rax, rax
jne 0x1400495fc
call fcn.140174cc4
mov ecx, dword [rax]
mov edx, 4
mov dword [rsp + 0x28], 0x1f
mov r8d, 0xe8
mov dword [rsp + 0x20], reloc.WS2_32.dll_setsockopt
lea r9d, [rdx + 2]
call fcn.140040f40
test eax, eax
je 0x1400496e8
lea rcx, [0x140270f40]
call sub.KERNEL32.dll_EnterCriticalSection
cmp rbx, qword [0x140270f90]
mov rcx, qword [rbx + 0xe0]
jne 0x14004964f
mov qword [0x140270f90], rcx
jmp 0x140049664
mov rax, qword [rbx + 0xe8]
mov qword [rax + 0xe0], rcx
mov rcx, qword [0x140270f90]
mov rdx, qword [rbx + 0xe0]
test rdx, rdx
je 0x140049680
mov rax, qword [rbx + 0xe8]
mov qword [rdx + 0xe8], rax
jmp 0x140049693
test rcx, rcx
je 0x140049693
mov rax, qword [rbx + 0xe8]
mov qword [rcx + 0xe8], rax
xor eax, eax
lea rcx, [0x140270f40]
mov qword [rbx + 0xe0], rax
mov qword [rbx + 0xe8], rax
call fcn.14002e7d0
mov eax, dword [rbx + 0x68]
btr eax, 0xd
bts eax, 0x1a
mov dword [rbx + 0x68], eax
or eax, 0xffffffff
lock xadd dword [rbx + 0x120], eax
cmp eax, 1
jne 0x1400496d5
mov rcx, rbx
call fcn.140042450
mov rbx, qword [rsp + 0x60]
or eax, 0xffffffff
mov rbp, qword [rsp + 0x68]
add rsp, 0x40
pop rsi
ret
lea rdx, str.WriteFileEx_failed:__m
mov ecx, 0x580000
call fcn.1400292e0
int3