Function at 0x180001220
Capabilities:
Connect socket
Convert ip address from string
Receive data
Receive data on socket
Send data
Send data on socket

Disassembly:
push rbp
push rbx
push rsi
push rdi
lea rbp, [rsp - 0x3f]
sub rsp, 0x88
mov rax, qword [0x18001c008]
xor rax, rsp
mov qword [rbp + 0x27], rax
mov rsi, rcx
xor eax, eax
lea rdi, [rbp - 9]
mov dword [rbp - 1], eax
mov ebx, 3
mov word [rbp + 3], ax
mov byte [rbp + 5], al
mov word [rbp - 9], ax
mov byte [rbp - 7], al
nop
xor r9d, r9d
mov r8d, ebx
mov rdx, rdi
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_recv]
test eax, eax
je 0x180001286
cmp eax, 0xffffffff
je 0x180001282
sub ebx, eax
cdqe
add rdi, rax
test ebx, ebx
jg 0x180001260
movzx eax, byte [rbp - 9]
cmp al, 5
je 0x180001320
cmp al, 0x12
je 0x18000130d
cmp al, 0x31
jne 0x1800012f0
cmp byte [rbp - 8], 0x41
jne 0x1800012f0
cmp byte [rbp - 7], 0x59
jne 0x1800012f0
lea rdi, [rbp - 1]
mov ebx, 7
nop
xor r9d, r9d
mov r8d, ebx
mov rdx, rdi
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_recv]
test eax, eax
je 0x1800012d7
cmp eax, 0xffffffff
je 0x1800012d3
sub ebx, eax
movsxd rcx, eax
add rdi, rcx
test ebx, ebx
jg 0x1800012b0
lea rdx, [0x180019df0]
lea rcx, [rbp - 1]
call fcn.180002570
test rax, rax
jne 0x180001242
mov eax, 1
mov rcx, qword [rbp + 0x27]
xor rcx, rsp
call fcn.180001770
add rsp, 0x88
pop rdi
pop rsi
pop rbx
pop rbp
ret
cmp byte [rbp - 8], 0x34
jne 0x1800012f0
cmp byte [rbp - 7], 0x56
jne 0x1800012f0
mov eax, 0xffffffff
jmp 0x1800012f5
cmp byte [rbp - 8], 1
jne 0x1800012f0
cmp byte [rbp - 7], 0
jne 0x1800012f0
mov qword [rsp + 0xb8], r12
lea rdx, [rbp - 9]
mov r12d, 2
mov word [rbp - 9], 5
mov r8d, r12d
xor r9d, r9d
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_send]
lea rdi, [rbp - 9]
mov ebx, 4
nop dword [rax]
xor r9d, r9d
mov r8d, ebx
mov rdx, rdi
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_recv]
test eax, eax
je 0x180001386
cmp eax, 0xffffffff
je 0x180001382
sub ebx, eax
cdqe
add rdi, rax
test ebx, ebx
jg 0x180001360
cmp byte [rbp - 9], 5
mov qword [rsp + 0xc0], r14
mov qword [rsp + 0x80], r15
jne 0x18000159e
cmp byte [rbp - 8], 1
jne 0x18000159e
cmp byte [rbp - 7], 0
jne 0x18000159e
movsx eax, byte [rbp - 6]
cmp eax, 1
jne 0x180001542
lea ecx, [rax + 3]
call fcn.180004cf8
mov r14, rax
mov rdi, rax
mov ebx, 4
xor r9d, r9d
mov r8d, ebx
mov rdx, rdi
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_recv]
test eax, eax
je 0x1800013fa
cmp eax, 0xffffffff
je 0x1800013f6
sub ebx, eax
cdqe
add rdi, rax
test ebx, ebx
jg 0x1800013d4
lea rdi, [rbp - 9]
mov ebx, r12d
xor r9d, r9d
mov r8d, ebx
mov rdx, rdi
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_recv]
test eax, eax
je 0x180001427
cmp eax, 0xffffffff
je 0x180001423
sub ebx, eax
cdqe
add rdi, rax
test ebx, ebx
jg 0x180001401
movzx r15d, word [rbp - 9]
movzx ecx, r15w
call qword [sym.imp.WS2_32.dll_ntohs]
mov edx, 1
mov ecx, r12d
movzx ebx, ax
lea r8d, [rdx + 5]
call qword [sym.imp.WS2_32.dll_socket]
movsx ecx, byte [r14 + 3]
mov rdi, rax
movsx edx, byte [r14 + 2]
xor eax, eax
movsx r8d, byte [r14 + 1]
movsx r9d, byte [r14]
mov dword [rsp + 0x30], ecx
lea rcx, [rbp + 0xf]
mov dword [rsp + 0x28], edx
lea edx, [rax + 0x10]
mov dword [rsp + 0x20], r8d
lea r8, str._hhu._hhu._hhu._hhu
mov qword [rbp + 0xf], rax
mov qword [rbp + 0x17], rax
call fcn.180001010
xor eax, eax
lea r8, [rbp + 3]
mov qword [rbp - 1], rax
lea rdx, [rbp + 0xf]
mov ecx, r12d
mov word [rbp - 1], r12w
mov qword [rbp + 7], rax
call qword [sym.imp.WS2_32.dll_inet_pton]
movzx ecx, bx
call qword [sym.imp.WS2_32.dll_htons]
mov r8d, reloc.WS2_32.dll_recv
lea rdx, [rbp - 1]
mov rcx, rdi
mov word [rbp + 1], ax
call qword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
je 0x18000159e
cmp rdi, 0xffffffffffffffff
je 0x18000159e
xor r9d, r9d
mov word [rbp - 9], r15w
lea rdx, [rbp - 1]
mov dword [rbp - 1], 0x1000005
mov rcx, rsi
lea r8d, [r9 + 4]
call qword [sym.imp.WS2_32.dll_send]
xor r9d, r9d
mov rdx, r14
mov rcx, rsi
lea r8d, [r9 + 4]
call qword [sym.imp.WS2_32.dll_send]
xor r9d, r9d
lea rdx, [rbp - 9]
mov r8d, r12d
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_send]
mov rcx, r14
call fcn.180004dd8
mov rdx, rsi
mov rcx, rdi
call fcn.180001070
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_closesocket]
jmp 0x18000159e
cmp eax, 4
jne 0x18000159e
lea rdi, [rbp + 0xf]
mov ebx, reloc.WS2_32.dll_select
xor r9d, r9d
mov r8d, ebx
mov rdx, rdi
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_recv]
test eax, eax
je 0x180001576
cmp eax, 0xffffffff
je 0x180001572
sub ebx, eax
cdqe
add rdi, rax
test ebx, ebx
jg 0x180001550
xor r9d, r9d
mov dword [rbp - 1], 0x1000805
lea rdx, [rbp - 1]
mov dword [rbp + 3], 0x11111111
mov rcx, rsi
mov word [rbp + 7], 0x2222
lea r8d, [r9 + 0xa]
call qword [sym.imp.WS2_32.dll_send]
mov r15, qword [rsp + 0x80]
xor eax, eax
mov r14, qword [rsp + 0xc0]
mov r12, qword [rsp + 0xb8]
jmp 0x1800012f5