Function at 0x140004870
Capabilities:
Create thread

Disassembly:
push rbp
push rsi
push rdi
sub rsp, 0x70
mov qword [rsp + 0x40], 0xfffffffffffffffe
mov qword [rsp + 0xa0], rbx
mov rbp, rdx
mov rdi, rcx
movzx r8d, byte [rdx]
test r8d, r8d
je 0x140004d7b
dec r8d
je 0x140004c57
dec r8d
je 0x140004a57
sub r8d, 2
je 0x140004903
dec r8d
jne 0x140004e17
mov ecx, 0x20000
call fcn.14001a7c0
mov rbx, rax
mov qword [0x140046360], rax
xor edx, edx
mov r8d, 0x20000
mov rcx, rax
call fcn.14001c0f0
mov byte [rbx], 2
xor edx, edx
lea ecx, [rdx + 2]
call qword [sym.imp.KERNEL32.dll_CreateToolhelp32Snapshot]
cmp rax, 0xffffffffffffffff
je 0x140004dbe
lea rcx, [rsp + 0x31]
jmp 0x140004dda
mov rbx, qword [0x140047998]
xor edi, edi
mov rdx, qword [0x1400479a0]
cmp rbx, rdx
je 0x1400049c6
lea rsi, [rbx + 8]
mov rax, qword [rbx]
mov rcx, qword [rax + 8]
test rcx, rcx
je 0x14000493f
call fcn.14001aa28
mov r11, qword [rbx]
mov qword [r11 + 8], rdi
mov rdx, qword [0x1400479a0]
mov rcx, qword [rbx]
cmp qword [rcx], rdi
je 0x14000495c
mov rcx, qword [rcx]
call fcn.14001a410
mov r11, qword [rbx]
mov qword [r11], rdi
mov rdx, qword [0x1400479a0]
mov rcx, qword [rbx]
test rcx, rcx
je 0x140004973
call fcn.14001a410
mov qword [rbx], rdi
mov rdx, qword [0x1400479a0]
sub rdx, rsi
sar rdx, 3
lea r8, [rdx*8]
mov rdx, rsi
mov rcx, rbx
call fcn.14001a430
mov rdx, qword [0x1400479a0]
sub rdx, 8
mov qword [0x1400479a0], rdx
cmp rbx, rdx
jne 0x140004920
mov rbx, qword [0x140047998]
cmp rbx, rdx
je 0x1400049c6
xor r8d, r8d
mov rcx, rbx
call fcn.14001a430
mov rbx, qword [0x140047998]
mov qword [0x140047998], rdi
mov qword [0x1400479a0], rdi
mov qword [0x1400479a8], rdi
test rbx, rbx
je 0x1400049e8
mov rcx, rbx
call fcn.14001a410
mov rbx, qword [0x140046358]
mov ecx, 0x200
call fcn.14001a7c0
mov rdi, rax
xor edx, edx
mov r8d, 0x200
mov rcx, rax
call fcn.14001c0f0
mov byte [rdi], 1
lea rcx, [rdi + 2]
lea rax, [0x140037924]
mov qword [rsp + 0x20], rax
lea r9, [0x140037e28]
lea r8, str._s__s_n
mov edx, 0xff
call fcn.14001a864
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.14001a410
jmp 0x140004e17
mov ecx, 0x468
call fcn.14001a7c0
mov rsi, rax
xor edx, edx
mov r8d, 0x468
mov rcx, rax
call fcn.14001c0f0
mov rcx, rsi
lea rdx, [rbp + 1]
mov r8d, 0x468
call fcn.14001a430
movsxd rbx, dword [rbp + 0x469]
mov rcx, rbx
call fcn.14001aa30
mov rdi, rax
lea rdx, [rbp + 0x46d]
mov r8, rbx
mov rcx, rax
call fcn.14001a430
mov ecx, reloc.WS2_32.dll_recv
call fcn.14001a7c0
mov rbp, rax
mov qword [rsp + 0x38], rax
mov qword [rax], rsi
mov qword [rax + 8], rdi
lea rax, [rsp + 0x38]
mov r8, qword [0x140047998]
mov rcx, qword [0x1400479a0]
cmp rax, rcx
jae 0x140004b96
lea rax, [rsp + 0x38]
cmp r8, rax
ja 0x140004b96
lea rbx, [rsp + 0x38]
sub rbx, r8
sar rbx, 3
xor edi, edi
mov rdx, qword [0x1400479a8]
cmp rcx, rdx
jne 0x140004b81
mov rax, rcx
sub rax, r8
sar rax, 3
movabs r9, 0x1ffffffffffffffe
cmp rax, r9
jbe 0x140004b31
lea rcx, str.vector_T__too_long
call fcn.14002bb20
int3
inc rax
sub rdx, r8
sar rdx, 3
cmp rax, rdx
jbe 0x140004b81
mov r8, rdx
shr r8, 1
movabs rcx, 0x1fffffffffffffff
sub rcx, r8
cmp rcx, rdx
jae 0x140004b5d
mov rdx, rdi
jmp 0x140004b60
add rdx, r8
cmp rdx, rax
cmovb rdx, rax
lea rcx, [0x140047998]
call fcn.140004e60
mov rcx, qword [0x1400479a0]
mov r8, qword [0x140047998]
test rcx, rcx
je 0x140004c22
mov rax, qword [r8 + rbx*8]
mov qword [rcx], rax
jmp 0x140004c1b
xor edi, edi
mov rdx, qword [0x1400479a8]
cmp rcx, rdx
jne 0x140004c13
mov rax, rcx
sub rax, r8
sar rax, 3
movabs r9, 0x1ffffffffffffffe
cmp rax, r9
jbe 0x140004bca
lea rcx, str.vector_T__too_long
call fcn.14002bb20
int3
inc rax
sub rdx, r8
sar rdx, 3
cmp rax, rdx
jbe 0x140004c13
mov r8, rdx
shr r8, 1
movabs rcx, 0x1fffffffffffffff
sub rcx, r8
cmp rcx, rdx
jae 0x140004bf6
mov rdx, rdi
jmp 0x140004bf9
add rdx, r8
cmp rdx, rax
cmovb rdx, rax
lea rcx, [0x140047998]
call fcn.140004e60
mov rcx, qword [0x1400479a0]
test rcx, rcx
je 0x140004c22
mov qword [rcx], rbp
mov rcx, qword [0x1400479a0]
add rcx, 8
mov qword [0x1400479a0], rcx
mov qword [rsp + 0x28], rdi
mov dword [rsp + 0x20], edi
mov r9, rbp
lea r8, [0x1400042c0]
xor edx, edx
xor ecx, ecx
call fcn.14001b218
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x140004e17
mov ecx, 0x468
call fcn.14001a7c0
mov rsi, rax
xor edx, edx
mov r8d, 0x468
mov rcx, rax
call fcn.14001c0f0
mov rcx, rsi
lea rdx, [rbp + 1]
mov r8d, 0x468
call fcn.14001a430
mov rbx, qword [0x140047998]
mov r9, qword [0x1400479a0]
cmp rbx, r9
je 0x140004d25
nop dword [rax]
mov rax, qword [rbx]
mov rcx, qword [rax]
mov r8, rsi
sub r8, rcx
nop dword [rax]
movzx edx, word [rcx]
movzx eax, word [rcx + r8]
sub edx, eax
jne 0x140004cc4
add rcx, 2
test eax, eax
jne 0x140004cb0
test edx, edx
je 0x140004cd3
add rbx, 8
cmp rbx, r9
jne 0x140004ca0
jmp 0x140004d25
lea r8, [rsi + 0x1fe]
mov rax, qword [rbx]
mov rcx, qword [rax]
add rcx, 0x1fe
mov edx, 0xff
call fcn.14001ae5c
xor edi, edi
mov qword [rsp + 0x28], rdi
mov dword [rsp + 0x20], edi
mov r9, qword [rbx]
lea r8, [0x1400042c0]
xor edx, edx
xor ecx, ecx
call fcn.14001b218
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, rsi
call fcn.14001a410
jmp 0x140004e17
mov ecx, 0x469
call fcn.14001aa30
mov rbx, rax
mov byte [rax], 5
mov eax, 1
mov dword [rsi + 0x3fc], eax
lea rcx, [rbx + 1]
mov r8d, 0x468
mov rdx, rsi
call fcn.14001a430
mov rcx, qword [rdi + 8]
mov r9, qword [rcx]
mov r8d, 0x469
mov rdx, rbx
call qword [r9 + reloc.WS2_32.dll_recv]
mov rcx, rsi
call fcn.14001a410
mov rcx, rbx
call fcn.14001a410
jmp 0x140004e17
mov eax, 1
xchg dword [rcx + 0x230], eax
mov ecx, 0x20000
call fcn.14001a7c0
mov rbx, rax
mov qword [0x140046360], rax
xor edx, edx
mov r8d, 0x20000
mov rcx, rax
call fcn.14001c0f0
mov byte [rbx], 2
xor edx, edx
lea ecx, [rdx + 2]
call qword [sym.imp.KERNEL32.dll_CreateToolhelp32Snapshot]
cmp rax, 0xffffffffffffffff
jne 0x140004dd5
lea r8, str._vz
mov edx, 0xffff
lea rcx, [rbx + 2]
call fcn.14001a864
jmp 0x140004de6
lea rcx, [rsp + 0x30]
mov r8, rax
lea rdx, [rbx + 2]
call fcn.1400045a0
mov rcx, qword [rdi + 8]
mov rax, qword [rcx]
mov r8d, 0x20000
mov rdx, qword [0x140046360]
call qword [rax + reloc.WS2_32.dll_recv]
mov rcx, qword [0x140046360]
test rcx, rcx
je 0x140004e17
call fcn.14001a410
xor edi, edi
mov qword [0x140046360], rdi
mov rbx, qword [rsp + 0xa0]
add rsp, 0x70
pop rdi
pop rsi
pop rbp
ret