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

Disassembly:
mov rax, rsp
push rbp
push r13
push r14
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 [0x1800548e0]
xor rax, rsp
mov qword [rbp + 0x160], rax
mov rbx, rcx
mov rdx, qword [rcx + 0x30]
xor eax, eax
or rcx, 0xffffffffffffffff
mov rdi, rdx
repne scasb al, byte [rdi]
not rcx
dec rcx
je 0x180005a41
or rcx, 0xffffffffffffffff
mov rdi, rdx
repne scasb al, byte [rdi]
not rcx
cmp rcx, 0x800
ja 0x180005a41
mov rcx, rbx
call fcn.180005090
mov rdx, qword [rbx + 0x50]
mov qword [rbp - 0x60], recv
xor r13d, r13d
mov qword [rbp - 0x68], r13
mov byte [rbp - 0x78], r13b
xor eax, eax
or rcx, 0xffffffffffffffff
mov rdi, rdx
repne scasb al, byte [rdi]
not rcx
lea r8, [rcx - 1]
lea rcx, [rbp - 0x78]
call fcn.180003360
nop
cmp dword [rbx + 0x40], 0xffffffff
je 0x18000556b
cmp qword [rbp - 0x60], 0x10
jb 0x180005564
mov rcx, qword [rbp - 0x78]
call fcn.18002228c
mov al, 1
jmp 0x180005a41
mov dword [rbx + 0x40], 0xffffffff
mov ecx, 0x101
lea rdx, [rbp - 0x40]
call qword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x180005591
lea rcx, str.WSAStartup_error
call fcn.180022a34
xor r8d, r8d
lea edx, [r8 + 1]
mov r14d, 2
mov ecx, r14d
call qword [sym.imp.WS2_32.dll_socket]
mov dword [rbx + 0x40], eax
test eax, eax
jns 0x1800055b3
jmp 0x180005a2f
mov qword [rsp + 0x50], r13
mov qword [rsp + 0x20], r13
mov qword [rsp + 0x30], r13
mov qword [rsp + 0x38], r13
mov qword [rsp + 0x40], r13
mov dword [rsp + 0x48], 0x50
mov dword [rsp + 0x28], r13d
mov rdx, qword [rbx + 0x30]
lea rcx, [rsp + 0x20]
call fcn.180008090
cmp dword [rsp + 0x48], 0
jge 0x18000563f
mov rcx, qword [rsp + 0x20]
test rcx, rcx
je 0x1800055fd
call fcn.180022284
mov rcx, qword [rsp + 0x30]
test rcx, rcx
je 0x18000560c
call fcn.180022284
mov rcx, qword [rsp + 0x38]
test rcx, rcx
je 0x18000561b
call fcn.180022284
mov rcx, qword [rsp + 0x40]
test rcx, rcx
je 0x18000562a
call fcn.180022284
mov rcx, qword [rsp + 0x50]
test rcx, rcx
je 0x18000563a
call fcn.180022284
nop
jmp 0x180005a2f
mov rsi, qword [rsp + 0x30]
test rsi, rsi
jne 0x18000568b
mov rcx, qword [rsp + 0x20]
test rcx, rcx
je 0x180005658
call fcn.180022284
mov rcx, qword [rsp + 0x38]
test rcx, rcx
je 0x180005667
call fcn.180022284
mov rcx, qword [rsp + 0x40]
test rcx, rcx
je 0x180005676
call fcn.180022284
mov rcx, qword [rsp + 0x50]
test rcx, rcx
je 0x180005686
call fcn.180022284
nop
jmp 0x180005a2f
mov qword [rsp + 0x78], recv
mov qword [rsp + 0x70], r13
mov byte [rsp + 0x60], 0
xor eax, eax
or rcx, 0xffffffffffffffff
mov rdi, rsi
repne scasb al, byte [rdi]
not rcx
lea r8, [rcx - 1]
mov rdx, rsi
lea rcx, [rsp + 0x60]
call fcn.180003360
nop
lea rcx, [rsp + 0x60]
mov rdi, qword [rsp + 0x78]
cmp rdi, 0x10
cmovae rcx, qword [rsp + 0x60]
xor r8d, r8d
lea rdx, [0x180045347]
call fcn.180036080
movsxd rcx, eax
test eax, eax
jne 0x1800056f5
mov eax, r13d
cmp qword [rsp + 0x70], rax
setne al
mov ecx, eax
test ecx, ecx
sete al
test al, al
je 0x18000576b
cmp rdi, 0x10
jb 0x18000570e
mov rcx, qword [rsp + 0x60]
call fcn.18002228c
mov qword [rsp + 0x78], recv
mov qword [rsp + 0x70], r13
mov byte [rsp + 0x60], 0
mov rcx, qword [rsp + 0x20]
test rcx, rcx
je 0x180005730
call fcn.180022284
mov rcx, rsi
call fcn.180022284
mov rcx, qword [rsp + 0x38]
test rcx, rcx
je 0x180005747
call fcn.180022284
mov rcx, qword [rsp + 0x40]
test rcx, rcx
je 0x180005756
call fcn.180022284
mov rcx, qword [rsp + 0x50]
test rcx, rcx
je 0x180005766
call fcn.180022284
nop
jmp 0x180005a2f
xor eax, eax
mov qword [rbp - 0x50], rax
mov qword [rbp - 0x48], rax
mov word [rbp - 0x50], r14w
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 0x18000581d
mov rcx, rbx
call fcn.180005b00
nop
cmp qword [rsp + 0x78], 0x10
jb 0x1800057c0
mov rcx, qword [rsp + 0x60]
call fcn.18002228c
mov qword [rsp + 0x78], recv
mov qword [rsp + 0x70], r13
mov byte [rsp + 0x60], 0
mov rcx, qword [rsp + 0x20]
test rcx, rcx
je 0x1800057e2
call fcn.180022284
mov rcx, rsi
call fcn.180022284
mov rcx, qword [rsp + 0x38]
test rcx, rcx
je 0x1800057f9
call fcn.180022284
mov rcx, qword [rsp + 0x40]
test rcx, rcx
je 0x180005808
call fcn.180022284
mov rcx, qword [rsp + 0x50]
test rcx, rcx
je 0x180005818
call fcn.180022284
nop
jmp 0x180005a2f
movsx r8, word [rax + 0x12]
mov rdx, qword [rax + 0x18]
mov rdx, qword [rdx]
lea rcx, [rbp - 0x4c]
call fcn.180022620
movsxd rcx, dword [rbx + 0x40]
mov r8d, reloc.WS2_32.dll_recv
lea rdx, [rbp - 0x50]
call qword [sym.imp.WS2_32.dll_connect]
test eax, eax
jne 0x1800058b9
cmp qword [rsp + 0x78], 0x10
jb 0x18000585c
mov rcx, qword [rsp + 0x60]
call fcn.18002228c
mov qword [rsp + 0x78], recv
mov qword [rsp + 0x70], r13
mov byte [rsp + 0x60], 0
mov rcx, qword [rsp + 0x20]
test rcx, rcx
je 0x18000587e
call fcn.180022284
mov rcx, rsi
call fcn.180022284
mov rcx, qword [rsp + 0x38]
test rcx, rcx
je 0x180005895
call fcn.180022284
mov rcx, qword [rsp + 0x40]
test rcx, rcx
je 0x1800058a4
call fcn.180022284
mov rcx, qword [rsp + 0x50]
test rcx, rcx
je 0x1800058b4
call fcn.180022284
nop
jmp 0x180005554
jns 0x180005941
call fcn.180022cc4
cmp dword [rax], 0x70
je 0x180005941
mov rcx, rbx
call fcn.180005b00
nop
cmp qword [rsp + 0x78], 0x10
jb 0x1800058e4
mov rcx, qword [rsp + 0x60]
call fcn.18002228c
mov qword [rsp + 0x78], recv
mov qword [rsp + 0x70], r13
mov byte [rsp + 0x60], 0
mov rcx, qword [rsp + 0x20]
test rcx, rcx
je 0x180005906
call fcn.180022284
mov rcx, rsi
call fcn.180022284
mov rcx, qword [rsp + 0x38]
test rcx, rcx
je 0x18000591d
call fcn.180022284
mov rcx, qword [rsp + 0x40]
test rcx, rcx
je 0x18000592c
call fcn.180022284
mov rcx, qword [rsp + 0x50]
test rcx, rcx
je 0x18000593c
call fcn.180022284
nop
jmp 0x180005a2f
mov ecx, dword [rbx + 0x40]
call fcn.180004d60
test eax, eax
jle 0x1800059bc
cmp qword [rsp + 0x78], 0x10
jb 0x18000595f
mov rcx, qword [rsp + 0x60]
call fcn.18002228c
mov qword [rsp + 0x78], recv
mov qword [rsp + 0x70], r13
mov byte [rsp + 0x60], 0
mov rcx, qword [rsp + 0x20]
test rcx, rcx
je 0x180005981
call fcn.180022284
mov rcx, rsi
call fcn.180022284
mov rcx, qword [rsp + 0x38]
test rcx, rcx
je 0x180005998
call fcn.180022284
mov rcx, qword [rsp + 0x40]
test rcx, rcx
je 0x1800059a7
call fcn.180022284
mov rcx, qword [rsp + 0x50]
test rcx, rcx
je 0x1800059b7
call fcn.180022284
nop
jmp 0x180005554
mov rcx, rbx
call fcn.180005b00
nop
cmp qword [rsp + 0x78], 0x10
jb 0x1800059d7
mov rcx, qword [rsp + 0x60]
call fcn.18002228c
mov qword [rsp + 0x78], recv
mov qword [rsp + 0x70], r13
mov byte [rsp + 0x60], 0
mov rcx, qword [rsp + 0x20]
test rcx, rcx
je 0x1800059f9
call fcn.180022284
mov rcx, rsi
call fcn.180022284
mov rcx, qword [rsp + 0x38]
test rcx, rcx
je 0x180005a10
call fcn.180022284
mov rcx, qword [rsp + 0x40]
test rcx, rcx
je 0x180005a1f
call fcn.180022284
mov rcx, qword [rsp + 0x50]
test rcx, rcx
je 0x180005a2f
call fcn.180022284
nop
cmp qword [rbp - 0x60], 0x10
jb 0x180005a3f
mov rcx, qword [rbp - 0x78]
call fcn.18002228c
xor al, al
mov rcx, qword [rbp + 0x160]
xor rcx, rsp
call fcn.1800221a0
lea r11, [rsp + 0x270]
mov rbx, qword [r11 + 0x28]
mov rsi, qword [r11 + 0x30]
mov rdi, qword [r11 + 0x38]
mov rsp, r11
pop r14
pop r13
pop rbp
ret