Function at 0x140005690
Capabilities:
Create thread
Get hostname
Initialize winsock library
Resolve dns

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x320
mov rax, qword [0x140020008]
xor rax, rsp
mov qword [rsp + 0x310], rax
xor ebx, ebx
lea rdx, [rsp + 0x70]
mov ecx, 0x202
mov dword [0x140022d50], ebx
mov edi, ebx
call qword [sym.imp.WS2_32.dll_WSAStartup]
lea rcx, [0x140022cf0]
call qword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
xor r8d, r8d
lea edx, [rbx + 1]
lea ecx, [rbx + 2]
call qword [sym.imp.WS2_32.dll_socket]
mov rsi, rax
cmp rax, 0xffffffffffffffff
je 0x140005892
mov qword [rsp + 0x40], rbx
lea rax, [rsp + 0x60]
mov qword [rsp + 0x38], rbx
lea r9d, [rbx + 0x10]
mov qword [rsp + 0x30], rax
lea r8, [rsp + 0x50]
lea rax, [0x140022d18]
mov dword [rsp + 0x28], 8
mov edx, 0xc8000006
mov qword [rsp + 0x20], rax
mov rcx, rsi
mov dword [rsp + 0x50], 0x25a207b9
mov dword [rsp + 0x54], 0x4660ddf3
mov dword [rsp + 0x58], 0xe576e98e
mov dword [rsp + 0x5c], 0x3e06748c
call qword [sym.imp.WS2_32.dll_WSAIoctl]
test eax, eax
jne 0x140005892
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_closesocket]
test eax, eax
jne 0x140005892
xor r9d, r9d
lea rcx, [rbx - 1]
xor r8d, r8d
xor edx, edx
call qword [sym.imp.KERNEL32.dll_CreateIoCompletionPort]
mov qword [0x140022d20], rax
test rax, rax
je 0x140005892
mov edx, 0x100
lea rcx, [rsp + 0x210]
call qword [sym.imp.WS2_32.dll_gethostname]
cmp eax, 0xffffffff
je 0x1400057be
lea rcx, [rsp + 0x210]
call qword [sym.imp.WS2_32.dll_gethostbyname]
mov qword [0x140022d48], rax
lea rax, [0x140022d38]
mov qword [0x140022d28], rbx
mov qword [0x140022d40], rax
lea rcx, [0x140022d28]
lea rax, [0x140022ce0]
mov qword [0x140022d30], rcx
mov qword [0x140022ce8], rax
mov qword [0x140022d38], rbx
mov qword [0x140022ce0], rbx
call fcn.140004810
test eax, eax
je 0x140005892
mov qword [rsp + 0x28], rbx
lea r8, [0x140004e80]
xor r9d, r9d
mov dword [rsp + 0x20], ebx
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov rdi, rax
cmp rax, 0xffffffffffffffff
je 0x140005892
mov qword [rsp + 0x28], rbx
lea r8, [0x1400053f0]
xor r9d, r9d
mov dword [rsp + 0x20], ebx
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov rbx, rax
cmp rax, 0xffffffffffffffff
je 0x140005892
mov rcx, qword [0x140022d20]
xor r9d, r9d
xor edx, edx
lea r8d, [r9 + 1]
call qword [sym.imp.KERNEL32.dll_PostQueuedCompletionStatus]
mov edx, 0xffffffff
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov ecx, 0xffffffff
call fcn.140004fe0
mov edx, 0xffffffff
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
lea rcx, [0x140022cf0]
call qword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
mov rcx, qword [0x140022d20]
test rcx, rcx
je 0x1400058b1
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test rdi, rdi
je 0x1400058bf
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test rbx, rbx
je 0x1400058cd
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
call qword [sym.imp.WS2_32.dll_WSACleanup]
mov rcx, qword [rsp + 0x310]
xor rcx, rsp
call fcn.140006290
lea r11, [rsp + 0x320]
mov rbx, qword [r11 + 0x10]
mov rsi, qword [r11 + 0x18]
mov rsp, r11
pop rdi
ret