Function at 0x180021af8
Capabilities:
Create thread
Initialize winsock library

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbp
mov qword [rax + 0x18], rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x220
mov r14, qword [0x1800593a8]
mov r13, rdx
lea rdx, [rax - 0x1c8]
xor r15d, r15d
mov ecx, 0x202
mov rdi, r15
call qword [sym.imp.WS2_32.dll_WSAStartup]
mov ebx, eax
cmp eax, r15d
jne 0x180021eb5
xor ecx, ecx
call fcn.18001ab60
lea rbp, [0x1800591f4]
lea rsi, reloc.OLEAUT32.dll_VariantClear
mov dword [0x180059498], eax
lea r12d, [r15 + 0x10]
mov r10, qword [rsi - 8]
mov r9d, r15d
mov r11d, r15d
mov r8b, byte [r10]
mov edx, r15d
mov edi, r15d
cmp r8b, r15b
je 0x180021be8
mov ebx, r15d
lea eax, [r8 - 0x30]
cmp al, 9
ja 0x180021b9e
test edx, 0xffffff00
jne 0x180021b9e
lea ecx, [rdx + rdx*4]
movsx eax, r8b
inc r9d
lea edx, [rax + rcx*2 - 0x30]
jmp 0x180021bc3
cmp r8b, 0x2e
jne 0x180021be8
cmp r9d, r15d
je 0x180021be8
test edx, 0xffffff00
jne 0x180021be8
mov ecx, ebx
inc r11d
mov r9d, r15d
shl edx, cl
or edi, edx
mov edx, r15d
add ebx, 8
inc r10
mov r8b, byte [r10]
cmp r8b, r15b
jne 0x180021b7e
cmp r11d, 3
jne 0x180021be8
cmp r9d, r15d
je 0x180021be8
test edx, 0xffffff00
jne 0x180021be8
shl edx, 0x18
or edx, edi
jmp 0x180021beb
or edx, 0xffffffff
mov dword [rbp - 4], edx
mov edx, 1
mov ecx, 0x20
sub ecx, dword [rsi]
shl edx, cl
lea ecx, [rdx - 1]
call qword [sym.imp.WS2_32.dll_htonl]
add rsi, 0x10
not eax
mov dword [rbp], eax
add rbp, 8
sub r12, 1
jne 0x180021b63
mov rcx, qword [0x180059270]
mov esi, 0xeb8
xor edx, edx
mov r8, rsi
lea ebx, [r12 + 8]
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rdi, rax
cmp rax, r15
je 0x180021eb5
mov r8, rsi
xor edx, edx
mov rcx, rax
call sub.ntdll.dll_memset
mov qword [rsp + 0x48], r15
mov qword [rsp + 0x40], r15
mov qword [rsp + 0x38], r15
lea rax, [0x18000f9d4]
mov qword [rsp + 0x30], r15
mov qword [rsp + 0x28], rax
xor r9d, r9d
xor r8d, r8d
mov rdx, r13
mov rcx, rdi
mov dword [rsp + 0x20], r15d
call fcn.180021054
mov ebx, eax
cmp eax, r15d
jne 0x180021eb5
lea ebp, [r12 + 1]
xor r9d, r9d
xor r8d, r8d
mov edx, ebp
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateEventA]
mov qword [rdi + 0xc20], rax
cmp rax, r15
jne 0x180021cc0
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
jmp 0x180021eb0
xor r9d, r9d
xor r8d, r8d
mov edx, ebp
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateEventA]
mov qword [rdi + 0xc30], rax
cmp rax, r15
je 0x180021cb3
movzx eax, word [rdi + 0x2e]
lea rsi, [rdi + 0xd48]
lea r9, [rsp + 0x70]
mov qword [rsp + 0x48], rsi
mov dword [rsp + 0x40], r15d
mov qword [rsp + 0x38], rdi
mov word [rsp + 0x70], ax
lea rax, [0x1800297d8]
mov r8d, ebp
mov qword [rsp + 0x30], rax
mov edx, 2
mov rcx, rdi
mov dword [rsp + 0x28], r15d
mov dword [rsp + 0x20], ebp
call fcn.180033e44
mov rdx, qword [rsi]
mov ebx, eax
cmp rdx, r15
je 0x180021d46
mov rcx, rdi
call fcn.180033d5c
mov ebx, eax
cmp eax, r15d
je 0x180021d5b
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
cmp ebx, r15d
je 0x180021d64
mov rcx, qword [rsi]
cmp rcx, r15
je 0x180021d5b
call fcn.180034124
mov qword [rsi], r15
cmp ebx, r15d
jne 0x180021eb5
movzx eax, word [rsp + 0x70]
mov rcx, rdi
mov word [rdi + 0x2e], ax
call fcn.180029bf0
mov ebx, eax
cmp eax, r15d
jne 0x180021eb5
mov rcx, rdi
call fcn.180022c20
cmp qword [rdi + 0xc50], r15
lea rax, [0x1800264cc]
mov qword [rsp + 0x60], rax
lea rax, [0x18001fb80]
mov r8d, r15d
mov qword [rsp + 0x58], rax
lea rax, [0x18002647c]
setne r8b
cmp qword [rdi + 0xc48], r15
mov qword [rsp + 0x50], rax
lea rax, [0x180026428]
mov qword [rsp + 0x48], rax
lea rax, [0x1800263a4]
mov edx, r15d
mov qword [rsp + 0x40], rax
lea rax, [0x180026344]
lea rcx, [rdi + 8]
mov qword [rsp + 0x38], rax
lea rax, [0x180026290]
setne dl
mov qword [rsp + 0x30], rax
lea rax, [0x1800261e8]
mov r9, rdi
mov qword [rsp + 0x28], rax
lea rax, [0x180026190]
mov qword [rsp + 0x20], rax
call fcn.180025fd4
mov qword [rdi + 0xe38], rax
cmp rax, r15
jne 0x180021e31
mov ebx, 8
jmp 0x180021eb5
lea rax, [rsp + 0x74]
lea r8, [0x1800201c4]
mov r9, rdi
mov qword [rsp + 0x28], rax
xor edx, edx
xor ecx, ecx
mov dword [rsp + 0x20], r15d
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov qword [rdi + 0xc38], rax
cmp rax, r15
je 0x180021cb3
lea rax, [rsp + 0x74]
lea r8, [0x18002fac8]
mov r9, rdi
mov qword [rsp + 0x28], rax
xor edx, edx
xor ecx, ecx
mov dword [rsp + 0x20], r15d
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov qword [rdi + 0xc40], rax
cmp rax, r15
je 0x180021cb3
mov rcx, qword [rdi + 0xc30]
mov dword [rdi + 0xc28], ebp
call qword [sym.imp.KERNEL32.dll_SetEvent]
mov qword [r14], rdi
mov ebx, r15d
cmp ebx, r15d
je 0x180021ebf
xor edx, edx
mov rcx, rdi
call fcn.180021ee4
lea r11, [rsp + 0x220]
mov eax, ebx
mov rbx, qword [r11 + 0x30]
mov rbp, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rdi
ret