Function at 0x140047e90
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 0x140047ee9
mov rax, qword gs:[0x58]
mov edx, 0x2f80
mov rcx, qword [rax]
mov rax, qword [rdx + rcx]
test rax, rax
jne 0x140047ed0
call fcn.1401760e4
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 0x140047f12
movsxd rcx, dword [rcx + 0x70]
call qword [sym.imp.WS2_32.dll_send]
movsxd rcx, eax
call fcn.140171070
mov rbx, qword [rsp + 0x60]
mov rbp, qword [rsp + 0x68]
add rsp, 0x40
pop rsi
ret
test al, al
js 0x140047f88
mov qword [rsp + 0x58], rdi
and eax, 0x3000
or edi, 0xffffffff
cmp eax, 0x3000
jne 0x140047f46
nop word [rax + rax]
mov edx, 1
mov ecx, edi
call qword [sym.imp.KERNEL32.dll_SleepEx]
test dword [rbx + 0x68], 0x2000
jne 0x140047f30
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.140171070
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 0x140047fc6
mov rax, qword gs:[0x58]
mov edx, 0x2f80
mov rcx, qword [rax]
mov rax, qword [rdx + rcx]
test rax, rax
jne 0x140047fad
call fcn.1401760e4
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.14005a520
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.14005a380
mov rcx, rbx
call fcn.140048f40
movsxd rcx, dword [rbx + 0x70]
lea rax, [0x140041800]
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.140171070
test eax, eax
je 0x14004806d
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, 0x2f80
mov rcx, qword [rax]
mov rax, qword [rdx + rcx]
test rax, rax
jne 0x14004808c
call fcn.1401760e4
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.14003f9a0
test eax, eax
je 0x140048178
lea rcx, [0x14027dfa0]
call sub.KERNEL32.dll_EnterCriticalSection
cmp rbx, qword [0x14027dff0]
mov rcx, qword [rbx + 0xe0]
jne 0x1400480df
mov qword [0x14027dff0], rcx
jmp 0x1400480f4
mov rax, qword [rbx + 0xe8]
mov qword [rax + 0xe0], rcx
mov rcx, qword [0x14027dff0]
mov rdx, qword [rbx + 0xe0]
test rdx, rdx
je 0x140048110
mov rax, qword [rbx + 0xe8]
mov qword [rdx + 0xe8], rax
jmp 0x140048123
test rcx, rcx
je 0x140048123
mov rax, qword [rbx + 0xe8]
mov qword [rcx + 0xe8], rax
xor eax, eax
lea rcx, [0x14027dfa0]
mov qword [rbx + 0xe0], rax
mov qword [rbx + 0xe8], rax
call sub.KERNEL32.dll_LeaveCriticalSection
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 0x140048165
mov rcx, rbx
call fcn.140040d80
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, 0x4b0000
call fcn.14002d720
int3