Function at 0x18000537c
Capabilities:
Connect socket
Initialize winsock library
Resolve dns

Disassembly:
mov rax, rsp
push rbp
push r12
push r13
lea rbp, [rax - 0x188]
sub rsp, 0x270
mov qword [rsp + 0x58], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
mov rax, qword [0x18004b8d8]
xor rax, rsp
mov qword [rbp + 0x160], rax
mov rdi, rcx
mov rcx, qword [rcx + 0x30]
call fcn.18001c010
xor esi, esi
test rax, rax
je 0x1800056e8
mov rcx, qword [rdi + 0x30]
call fcn.18001c010
inc rax
cmp rax, 0x800
ja 0x1800056e8
mov rcx, rdi
call fcn.180004f28
mov rbx, qword [rdi + 0x50]
lea r12d, [rsi + 0xf]
mov qword [rbp - 0x60], r12
mov qword [rbp - 0x68], rsi
mov byte [rbp - 0x78], sil
mov rcx, rbx
call fcn.18001c010
mov r8, rax
mov rdx, rbx
lea rcx, [rbp - 0x78]
call fcn.180003020
nop
cmp dword [rdi + 0x40], 0xffffffff
je 0x180005438
cmp qword [rbp - 0x60], 0x10
jb 0x180005431
mov rcx, qword [rbp - 0x78]
call fcn.18001c1c4
mov al, 1
jmp 0x1800056ea
or dword [rdi + 0x40], 0xffffffff
mov ecx, 0x101
lea rdx, [rbp - 0x40]
call qword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x18000545b
lea rcx, str.WSAStartup_error
call fcn.18001caa0
xor r8d, r8d
lea edx, [r8 + 1]
lea r13d, [r8 + 2]
mov ecx, r13d
call qword [sym.imp.WS2_32.dll_socket]
mov dword [rdi + 0x40], eax
test eax, eax
jns 0x18000547b
jmp 0x1800056d8
mov qword [rsp + 0x50], rsi
mov qword [rsp + 0x20], rsi
mov qword [rsp + 0x30], rsi
mov qword [rsp + 0x38], rsi
mov qword [rsp + 0x40], rsi
mov dword [rsp + 0x48], 0x50
mov dword [rsp + 0x28], esi
mov rdx, qword [rdi + 0x30]
lea rcx, [rsp + 0x20]
call fcn.1800075c4
cmp dword [rsp + 0x48], esi
jge 0x1800054c4
lea rcx, [rsp + 0x20]
call fcn.180007910
nop
jmp 0x1800056d8
mov rbx, qword [rsp + 0x30]
test rbx, rbx
jne 0x1800054de
lea rcx, [rsp + 0x20]
call fcn.180007910
nop
jmp 0x1800056d8
mov qword [rsp + 0x78], r12
mov qword [rsp + 0x70], rsi
mov byte [rsp + 0x60], sil
mov rcx, rbx
call fcn.18001c010
mov r8, rax
mov rdx, rbx
lea rcx, [rsp + 0x60]
call fcn.180003020
nop
lea rdx, [0x18003d357]
lea rcx, [rsp + 0x60]
call fcn.180006078
test eax, eax
jne 0x18000554c
cmp qword [rsp + 0x78], 0x10
jb 0x18000552d
mov rcx, qword [rsp + 0x60]
call fcn.18001c1c4
mov qword [rsp + 0x78], r12
mov qword [rsp + 0x70], rsi
mov byte [rsp + 0x60], sil
lea rcx, [rsp + 0x20]
call fcn.180007910
nop
jmp 0x1800056d8
xor edx, edx
lea r8d, [rdx + 0x10]
lea rcx, [rbp - 0x50]
call fcn.18001c0d0
mov word [rbp - 0x50], r13w
movzx ecx, word [rsp + 0x48]
call qword [sym.imp.WS2_32.dll_htons]
mov word [rbp - 0x4e], ax
lea rcx, [rsp + 0x60]
cmp qword [rsp + 0x78], 0x10
cmovae rcx, qword [rsp + 0x60]
call qword [sym.imp.WS2_32.dll_gethostbyname]
test rax, rax
jne 0x1800055c5
mov rcx, rdi
call fcn.180005718
nop
cmp qword [rsp + 0x78], 0x10
jb 0x1800055a6
mov rcx, qword [rsp + 0x60]
call fcn.18001c1c4
mov qword [rsp + 0x78], r12
mov qword [rsp + 0x70], rsi
mov byte [rsp + 0x60], sil
lea rcx, [rsp + 0x20]
call fcn.180007910
nop
jmp 0x1800056d8
movsx r8, word [rax + 0x12]
mov rdx, qword [rax + 0x18]
mov rdx, qword [rdx]
lea rcx, [rbp - 0x4c]
call fcn.18001bc00
movsxd rcx, dword [rdi + 0x40]
mov r8d, reloc.WS2_32.dll_recv
lea rdx, [rbp - 0x50]
call qword [sym.imp.WS2_32.dll_connect]
test eax, eax
jne 0x180005623
cmp qword [rsp + 0x78], 0x10
jb 0x180005604
mov rcx, qword [rsp + 0x60]
call fcn.18001c1c4
mov qword [rsp + 0x78], r12
mov qword [rsp + 0x70], rsi
mov byte [rsp + 0x60], sil
lea rcx, [rsp + 0x20]
call fcn.180007910
nop
jmp 0x180005421
jns 0x180005666
call fcn.18001cd30
cmp dword [rax], 0x70
je 0x180005666
mov rcx, rdi
call fcn.180005718
nop
cmp qword [rsp + 0x78], 0x10
jb 0x18000564a
mov rcx, qword [rsp + 0x60]
call fcn.18001c1c4
mov qword [rsp + 0x78], r12
mov qword [rsp + 0x70], rsi
mov byte [rsp + 0x60], sil
lea rcx, [rsp + 0x20]
call fcn.180007910
nop
jmp 0x1800056d8
mov ecx, dword [rdi + 0x40]
call fcn.180004bdc
test eax, eax
jle 0x1800056a3
cmp qword [rsp + 0x78], 0x10
jb 0x180005684
mov rcx, qword [rsp + 0x60]
call fcn.18001c1c4
mov qword [rsp + 0x78], r12
mov qword [rsp + 0x70], rsi
mov byte [rsp + 0x60], sil
lea rcx, [rsp + 0x20]
call fcn.180007910
nop
jmp 0x180005421
mov rcx, rdi
call fcn.180005718
nop
cmp qword [rsp + 0x78], 0x10
jb 0x1800056be
mov rcx, qword [rsp + 0x60]
call fcn.18001c1c4
mov qword [rsp + 0x78], r12
mov qword [rsp + 0x70], rsi
mov byte [rsp + 0x60], sil
lea rcx, [rsp + 0x20]
call fcn.180007910
nop
cmp qword [rbp - 0x60], 0x10
jb 0x1800056e8
mov rcx, qword [rbp - 0x78]
call fcn.18001c1c4
xor al, al
mov rcx, qword [rbp + 0x160]
xor rcx, rsp
call fcn.18001bbd0
lea r11, [rsp + 0x270]
mov rbx, qword [r11 + 0x28]
mov rsi, qword [r11 + 0x30]
mov rdi, qword [r11 + 0x38]
mov rsp, r11
pop r13
pop r12
pop rbp
ret