Function at 0x1400be520
Capabilities:
Connect socket
Convert ip address from string
Get geographical location
Initialize winsock library

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
push rbp
push rdi
push r14
mov rbp, rsp
sub rsp, 0x80
mov ecx, reloc.WS2_32.dll_recv
call qword [sym.imp.KERNEL32.dll_GetUserGeoID]
xor r14d, r14d
xor r9d, r9d
xor r8d, r8d
mov word [rsp + 0x20], r14w
mov ecx, eax
mov edi, eax
lea edx, [r14 + 4]
call qword [sym.imp.KERNEL32.dll_GetGeoInfoA]
xorps xmm0, xmm0
mov qword [rbp - 0x30], r14
movsxd rsi, eax
mov qword [rbp - 0x28], send
mov rbx, rsi
movups xmmword [rbp - 0x40], xmm0
mov byte [rbp - 0x40], r14b
test eax, eax
jne 0x1400be58c
mov qword [rbp - 0x30], rbx
mov byte [rbp + rsi - 0x40], r14b
jmp 0x1400be5c0
lea rcx, [rbp - 0x40]
cmp rbx, 0xf
ja 0x1400be5ab
mov r8, rbx
mov qword [rbp - 0x30], rbx
xor edx, edx
call fcn.1400e5340
mov byte [rbp + rsi - 0x40], r14b
jmp 0x1400be5c0
movzx r8d, byte [rbp + 0x20]
mov r9, rbx
mov rdx, rbx
mov byte [rsp + 0x20], r14b
call fcn.1400232f0
cmp qword [rbp - 0x28], 0x10
lea r8, [rbp - 0x40]
mov r9d, esi
mov word [rsp + 0x20], r14w
cmovae r8, qword [rbp - 0x40]
mov edx, 4
mov ecx, edi
call qword [sym.imp.KERNEL32.dll_GetGeoInfoA]
mov rcx, qword [rbp - 0x30]
dec rbx
cmp rbx, rcx
ja 0x1400be608
cmp qword [rbp - 0x28], 0x10
lea rax, [rbp - 0x40]
mov qword [rbp - 0x30], rbx
cmovae rax, qword [rbp - 0x40]
mov byte [rax + rbx], r14b
jmp 0x1400be65d
mov rdx, qword [rbp - 0x28]
mov rdi, rbx
mov rax, rdx
sub rdi, rcx
sub rax, rcx
cmp rdi, rax
ja 0x1400be644
mov qword [rbp - 0x30], rbx
cmp rdx, 0x10
lea rbx, [rbp - 0x40]
mov r8, rdi
cmovae rbx, qword [rbp - 0x40]
xor edx, edx
add rbx, rcx
mov rcx, rbx
call fcn.1400e5340
mov byte [rdi + rbx], r14b
jmp 0x1400be65d
movzx r8d, byte [rbp + 0x20]
lea rcx, [rbp - 0x40]
mov r9, rdi
mov byte [rsp + 0x20], r14b
mov rdx, rdi
call fcn.1400232f0
mov rbx, qword [0x140112468]
mov rsi, qword [0x140112470]
cmp rbx, rsi
je 0x1400be6ae
mov rdi, qword [rbp - 0x30]
cmp qword [rbx + 0x18], 0x10
mov rdx, rbx
jb 0x1400be681
mov rdx, qword [rbx]
cmp qword [rbp - 0x28], 0x10
lea rcx, [rbp - 0x40]
cmovae rcx, qword [rbp - 0x40]
cmp rdi, qword [rbx + 0x10]
jne 0x1400be6a5
mov r8, rdi
call fcn.1400e4ba0
test eax, eax
je 0x1400be89c
add rbx, 0x20
cmp rbx, rsi
jne 0x1400be674
xor eax, eax
mov byte [rbp - 0x50], r14b
xor edx, edx
mov qword [rbp - 0x48], rax
lea rcx, [rbp - 0x48]
call fcn.14002c290
mov ecx, 0x20
call fcn.1400e2cac
xorps xmm0, xmm0
movabs rdi, 0x7fffffffffffffff
mov rbx, rax
movups xmmword [rax], xmm0
mov qword [rax + 0x10], r14
mov qword [rax + 0x18], r14
lea r14, [rbp - 0x40]
cmp qword [rbp - 0x28], 0x10
mov rsi, qword [rbp - 0x30]
cmovae r14, qword [rbp - 0x40]
cmp rsi, rdi
ja 0x1400be94f
mov qword [rax + 0x18], send
cmp rsi, 0x10
jae 0x1400be71e
mov qword [rax + 0x10], rsi
movups xmm0, xmmword [r14]
movups xmmword [rax], xmm0
jmp 0x1400be75f
mov rax, rsi
or rax, 0xf
cmp rax, rdi
ja 0x1400be739
mov ecx, socket
mov rdi, rax
cmp rax, rcx
cmovb rdi, rcx
lea rdx, [rdi + 1]
mov rcx, rbx
call fcn.140027ca0
lea r8, [rsi + 1]
mov qword [rbx], rax
mov rdx, r14
mov qword [rbx + 0x10], rsi
mov rcx, rax
mov qword [rbx + 0x18], rdi
call fcn.1400e4ca0
mov eax, dword [str.system]
lea rdx, [rbp - 0x20]
movdqa xmm1, xmmword [0x1400f33a0]
lea rcx, [0x140110360]
xorps xmm0, xmm0
movups xmmword [rbp - 0x20], xmm0
mov dword [rbp - 0x20], eax
movzx eax, word [0x1400f09a4]
mov word [rbp - 0x1c], ax
movdqu xmmword [rbp - 0x10], xmm1
mov byte [rbp - 0x1a], 0
call fcn.140025b20
mov ecx, dword [0x1400f1ea0]
lea rdx, [rbp - 0x20]
movdqa xmm1, xmmword [reloc.WS2_32.dll_closesocket]
xorps xmm0, xmm0
movups xmmword [rbp - 0x20], xmm0
mov word [rbp - 0x20], cx
movzx ecx, byte [0x1400f1ea2]
mov byte [rbp - 0x1e], cl
mov rcx, rax
movdqu xmmword [rbp - 0x10], xmm1
mov byte [rbp - 0x1d], 0
call fcn.140025b20
movzx edx, byte [rax]
mov byte [rax], 3
mov rcx, qword [rax + 8]
mov qword [rbp - 0x48], rcx
lea rcx, [rbp - 0x48]
mov byte [rbp - 0x50], dl
mov qword [rax + 8], rbx
call fcn.14002c290
mov ecx, 0x202
lea rdx, [0x1401101b8]
call qword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
jne 0x1400be89c
mov ebx, 2
lea edx, [rax + 1]
mov ecx, ebx
xor r8d, r8d
call qword [sym.imp.WS2_32.dll_socket]
mov qword [0x1401101b0], rax
cmp rax, 0xffffffffffffffff
je 0x1400be896
movzx ecx, word [0x140112440]
mov word [0x140110350], bx
call qword [sym.imp.WS2_32.dll_htons]
cmp qword [0x140112438], 0x10
lea rdx, [0x140112420]
lea r8, [0x140110354]
mov word [0x140110352], ax
cmovae rdx, qword [0x140112420]
mov ecx, ebx
call qword [sym.imp.WS2_32.dll_inet_pton]
mov rcx, qword [0x1401101b0]
lea r8d, [rbx + 0xe]
lea rdx, [0x140110350]
call qword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x1400be8f0
mov rcx, qword [0x1401101b0]
call qword [sym.imp.WS2_32.dll_closesocket]
call qword [sym.imp.WS2_32.dll_WSACleanup]
xor bl, bl
mov rdx, qword [rbp - 0x28]
cmp rdx, 0x10
jb 0x1400be8d5
mov rcx, qword [rbp - 0x40]
inc rdx
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400be8d0
mov rcx, qword [rcx - 8]
add rdx, 0x27
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x1400be949
call fcn.1400e2ce8
lea r11, [rsp + 0x80]
movzx eax, bl
mov rbx, qword [r11 + 0x28]
mov rsi, qword [r11 + 0x30]
mov rsp, r11
pop r14
pop rdi
pop rbp
ret
lea rdx, [0x1400fd038]
lea rcx, [rbp - 0x20]
call fcn.1400bc4e0
lea rdx, [rbp - 0x20]
lea rcx, [0x140110150]
call fcn.140025a80
lea rcx, [rbp - 0x20]
call fcn.140027bd0
lea rdx, [0x1400fd028]
lea rcx, [rbp - 0x20]
call fcn.1400bc4e0
lea rdx, [rbp - 0x20]
lea rcx, [0x140110170]
call fcn.140025a80
lea rcx, [rbp - 0x20]
call fcn.140027bd0
mov bl, 1
jmp 0x1400be89e
call fcn.1400c4dd4
int3
call fcn.140027c40
int3