Function at 0x140004740
Capabilities:
Create thread

Disassembly:
mov rax, rsp
push rsi
push rdi
push r12
sub rsp, 0x70
mov qword [rsp + 0x40], 0xfffffffffffffffe
mov qword [rax + 0x18], rbx
mov qword [rax + 0x20], rbp
mov r12, rdx
mov rdi, rcx
movzx r8d, byte [rdx]
test r8d, r8d
je 0x140004c5c
dec r8d
je 0x140004b32
dec r8d
je 0x14000492a
sub r8d, 2
je 0x1400047d6
dec r8d
jne 0x140004cf8
mov ecx, 0x20000
call fcn.1400194f0
mov rbx, rax
mov qword [0x1400430c8], rax
xor edx, edx
mov r8d, 0x20000
mov rcx, rax
call fcn.14001aa00
mov byte [rbx], 2
xor edx, edx
lea ecx, [rdx + 2]
call qword [sym.imp.KERNEL32.dll_CreateToolhelp32Snapshot]
cmp rax, 0xffffffffffffffff
je 0x140004c9f
lea rcx, [rsp + 0x31]
jmp 0x140004cbb
mov rbx, qword [0x1400446f8]
xor edi, edi
mov rdx, qword [0x140044700]
cmp rbx, rdx
je 0x140004899
lea rsi, [rbx + 8]
mov rax, qword [rbx]
mov rcx, qword [rax + 8]
test rcx, rcx
je 0x140004812
call fcn.140019940
mov r11, qword [rbx]
mov qword [r11 + 8], rdi
mov rdx, qword [0x140044700]
mov rcx, qword [rbx]
cmp qword [rcx], rdi
je 0x14000482f
mov rcx, qword [rcx]
call fcn.140019140
mov r11, qword [rbx]
mov qword [r11], rdi
mov rdx, qword [0x140044700]
mov rcx, qword [rbx]
test rcx, rcx
je 0x140004846
call fcn.140019140
mov qword [rbx], rdi
mov rdx, qword [0x140044700]
sub rdx, rsi
sar rdx, 3
lea r8, [rdx*8]
mov rdx, rsi
mov rcx, rbx
call fcn.140019160
mov rdx, qword [0x140044700]
sub rdx, 8
mov qword [0x140044700], rdx
cmp rbx, rdx
jne 0x1400047f3
mov rbx, qword [0x1400446f8]
cmp rbx, rdx
je 0x140004899
xor r8d, r8d
mov rcx, rbx
call fcn.140019160
mov rbx, qword [0x1400446f8]
mov qword [0x1400446f8], rdi
mov qword [0x140044700], rdi
mov qword [0x140044708], rdi
test rbx, rbx
je 0x1400048bb
mov rcx, rbx
call fcn.140019140
mov rbx, qword [0x1400430c0]
mov ecx, 0x200
call fcn.1400194f0
mov rdi, rax
xor edx, edx
mov r8d, 0x200
mov rcx, rax
call fcn.14001aa00
mov byte [rdi], 1
lea rcx, [rdi + 2]
lea rax, [0x1400353e4]
mov qword [rsp + 0x20], rax
lea r9, [0x1400359b8]
lea r8, str._s__s_n
mov edx, 0xff
call fcn.140019594
mov rcx, qword [rbx + 8]
mov rax, qword [rcx]
mov r8d, 0x200
mov rdx, rdi
call qword [rax + reloc.WS2_32.dll_recv]
mov rcx, rdi
call fcn.140019140
jmp 0x140004cf8
mov ecx, 0x678
call fcn.1400194f0
mov rbp, rax
xor edx, edx
mov r8d, 0x678
mov rcx, rax
call fcn.14001aa00
mov rcx, rbp
lea rdx, [r12 + 1]
mov r8d, 0x678
call fcn.140019160
movsxd rsi, dword [r12 + 0x679]
mov rcx, rsi
call fcn.140019948
mov rdi, rax
lea rdx, [r12 + 0x67d]
mov r8, rsi
mov rcx, rax
call fcn.140019160
mov ecx, reloc.WS2_32.dll_recv
call fcn.1400194f0
mov r12, rax
mov qword [rsp + 0x38], rax
mov qword [rax], rbp
mov qword [rax + 8], rdi
mov rcx, qword [rax]
mov dword [rcx + 0x404], esi
lea rax, [rsp + 0x38]
mov r8, qword [0x1400446f8]
mov rcx, qword [0x140044700]
cmp rax, rcx
jae 0x140004a71
lea rax, [rsp + 0x38]
cmp r8, rax
ja 0x140004a71
lea rbx, [rsp + 0x38]
sub rbx, r8
sar rbx, 3
xor edi, edi
mov rdx, qword [0x140044708]
cmp rcx, rdx
jne 0x140004a5c
mov rax, rcx
sub rax, r8
sar rax, 3
movabs r9, 0x1ffffffffffffffe
cmp rax, r9
jbe 0x140004a0c
lea rcx, str.vector_T__too_long
call fcn.14002a850
int3
inc rax
sub rdx, r8
sar rdx, 3
cmp rax, rdx
jbe 0x140004a5c
mov r8, rdx
shr r8, 1
movabs rcx, 0x1fffffffffffffff
sub rcx, r8
cmp rcx, rdx
jae 0x140004a38
mov rdx, rdi
jmp 0x140004a3b
add rdx, r8
cmp rdx, rax
cmovb rdx, rax
lea rcx, [0x1400446f8]
call fcn.140004d40
mov rcx, qword [0x140044700]
mov r8, qword [0x1400446f8]
test rcx, rcx
je 0x140004afd
mov rax, qword [r8 + rbx*8]
mov qword [rcx], rax
jmp 0x140004af6
xor edi, edi
mov rdx, qword [0x140044708]
cmp rcx, rdx
jne 0x140004aee
mov rax, rcx
sub rax, r8
sar rax, 3
movabs r9, 0x1ffffffffffffffe
cmp rax, r9
jbe 0x140004aa5
lea rcx, str.vector_T__too_long
call fcn.14002a850
int3
inc rax
sub rdx, r8
sar rdx, 3
cmp rax, rdx
jbe 0x140004aee
mov r8, rdx
shr r8, 1
movabs rcx, 0x1fffffffffffffff
sub rcx, r8
cmp rcx, rdx
jae 0x140004ad1
mov rdx, rdi
jmp 0x140004ad4
add rdx, r8
cmp rdx, rax
cmovb rdx, rax
lea rcx, [0x1400446f8]
call fcn.140004d40
mov rcx, qword [0x140044700]
test rcx, rcx
je 0x140004afd
mov qword [rcx], r12
mov rcx, qword [0x140044700]
add rcx, 8
mov qword [0x140044700], rcx
mov qword [rsp + 0x28], rdi
mov dword [rsp + 0x20], edi
mov r9, r12
lea r8, [0x140004050]
xor edx, edx
xor ecx, ecx
call fcn.140019b88
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x140004cf8
mov ecx, 0x678
call fcn.1400194f0
mov rsi, rax
xor edx, edx
mov r8d, 0x678
mov rcx, rax
call fcn.14001aa00
mov rcx, rsi
lea rdx, [r12 + 1]
mov r8d, 0x678
call fcn.140019160
mov rbx, qword [0x1400446f8]
mov r9, qword [0x140044700]
cmp rbx, r9
je 0x140004c06
nop dword [rax]
mov rax, qword [rbx]
mov rcx, qword [rax]
add rcx, 4
lea r8, [rsi + 4]
sub r8, rcx
movzx edx, word [rcx]
movzx eax, word [rcx + r8]
sub edx, eax
jne 0x140004ba5
add rcx, 2
test eax, eax
jne 0x140004b91
test edx, edx
je 0x140004bb4
add rbx, 8
cmp rbx, r9
jne 0x140004b80
jmp 0x140004c06
lea r8, [rsi + 0x202]
mov rax, qword [rbx]
mov rcx, qword [rax]
add rcx, 0x202
mov edx, 0xff
call fcn.14001961c
xor edi, edi
mov qword [rsp + 0x28], rdi
mov dword [rsp + 0x20], edi
mov r9, qword [rbx]
lea r8, [0x140004050]
xor edx, edx
xor ecx, ecx
call fcn.140019b88
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, rsi
call fcn.140019140
jmp 0x140004cf8
mov ecx, 0x679
call fcn.140019948
mov rbx, rax
mov byte [rax], 5
mov eax, 1
mov dword [rsi + 0x400], eax
lea rcx, [rbx + 1]
mov r8d, 0x678
mov rdx, rsi
call fcn.140019160
mov rcx, qword [rdi + 8]
mov r9, qword [rcx]
mov r8d, 0x679
mov rdx, rbx
call qword [r9 + reloc.WS2_32.dll_recv]
mov rcx, rsi
call fcn.140019140
mov rcx, rbx
call fcn.140019140
jmp 0x140004cf8
mov eax, 1
xchg dword [rcx + 0x230], eax
mov ecx, 0x20000
call fcn.1400194f0
mov rbx, rax
mov qword [0x1400430c8], rax
xor edx, edx
mov r8d, 0x20000
mov rcx, rax
call fcn.14001aa00
mov byte [rbx], 2
xor edx, edx
lea ecx, [rdx + 2]
call qword [sym.imp.KERNEL32.dll_CreateToolhelp32Snapshot]
cmp rax, 0xffffffffffffffff
jne 0x140004cb6
lea r8, str._vz
mov edx, 0xffff
lea rcx, [rbx + 2]
call fcn.140019594
jmp 0x140004cc7
lea rcx, [rsp + 0x30]
mov r8, rax
lea rdx, [rbx + 2]
call fcn.140004470
mov rcx, qword [rdi + 8]
mov rax, qword [rcx]
mov r8d, 0x20000
mov rdx, qword [0x1400430c8]
call qword [rax + reloc.WS2_32.dll_recv]
mov rcx, qword [0x1400430c8]
test rcx, rcx
je 0x140004cf8
call fcn.140019140
xor edi, edi
mov qword [0x1400430c8], rdi
lea r11, [rsp + 0x70]
mov rbx, qword [r11 + 0x30]
mov rbp, qword [r11 + 0x38]
mov rsp, r11
pop r12
pop rdi
pop rsi
ret