Function at 0x140049bf0
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 0x140049c49
mov rax, qword gs:[0x58]
mov edx, 0x2fe0
mov rcx, qword [rax]
mov rax, qword [rdx + rcx]
test rax, rax
jne 0x140049c30
call fcn.140176664
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 0x140049c72
movsxd rcx, dword [rcx + 0x70]
call qword [sym.imp.WS2_32.dll_send]
movsxd rcx, eax
call fcn.140172320
mov rbx, qword [rsp + 0x60]
mov rbp, qword [rsp + 0x68]
add rsp, 0x40
pop rsi
ret
test al, al
js 0x140049ce8
mov qword [rsp + 0x58], rdi
and eax, 0x3000
or edi, 0xffffffff
cmp eax, 0x3000
jne 0x140049ca6
nop word [rax + rax]
mov edx, 1
mov ecx, edi
call qword [sym.imp.KERNEL32.dll_SleepEx]
test dword [rbx + 0x68], 0x2000
jne 0x140049c90
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.140172320
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 0x140049d26
mov rax, qword gs:[0x58]
mov edx, 0x2fe0
mov rcx, qword [rax]
mov rax, qword [rdx + rcx]
test rax, rax
jne 0x140049d0d
call fcn.140176664
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.14004ef50
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.14004edb0
mov rcx, rbx
call fcn.14004aca0
movsxd rcx, dword [rbx + 0x70]
lea rax, [0x140043570]
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.140172320
test eax, eax
je 0x140049dcd
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 0x140049dec
call fcn.140176664
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.1400415e0
test eax, eax
je 0x140049ed8
lea rcx, [0x140272f60]
call sub.KERNEL32.dll_EnterCriticalSection
cmp rbx, qword [0x140272fb0]
mov rcx, qword [rbx + 0xe0]
jne 0x140049e3f
mov qword [0x140272fb0], rcx
jmp 0x140049e54
mov rax, qword [rbx + 0xe8]
mov qword [rax + 0xe0], rcx
mov rcx, qword [0x140272fb0]
mov rdx, qword [rbx + 0xe0]
test rdx, rdx
je 0x140049e70
mov rax, qword [rbx + 0xe8]
mov qword [rdx + 0xe8], rax
jmp 0x140049e83
test rcx, rcx
je 0x140049e83
mov rax, qword [rbx + 0xe8]
mov qword [rcx + 0xe8], rax
xor eax, eax
lea rcx, [0x140272f60]
mov qword [rbx + 0xe0], rax
mov qword [rbx + 0xe8], rax
call fcn.14002ec90
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 0x140049ec5
mov rcx, rbx
call fcn.140042af0
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.140029170
int3