Function at 0x43ed50
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create udp socket
Resolve dns

Disassembly:
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x98
mov dword [rcx + 0x5f8], 0
mov qword [rcx + 0x4e818], 0
mov rsi, rcx
mov qword [rcx + 0x4e820], 0
mov byte [rcx + 0x4e810], 0
lea rcx, [rcx + 0x600]
mov byte [rcx + 0x4e211], 0
mov r12, rdx
mov rbx, r8
xor edx, edx
mov r8d, 0x27108
mov r13d, r9d
call sub.msvcrt.dll_memset
lea rcx, [rsi + 0x27708]
xor edx, edx
mov r8d, 0x27108
call sub.msvcrt.dll_memset
xor r8d, r8d
mov edx, 1
mov ecx, 2
call qword [sym.imp.WS2_32.dll_socket]
cmp eax, 0xffffffff
mov rdi, rax
je 0x43f160
lea rbp, [rsp + 0x58]
lea r8, [0x0054364f]
movabs rax, 0x100000002
mov r9d, r13d
mov edx, 8
mov qword [rsp + 0x60], 0
mov rcx, rbp
mov qword [rsp + 0x68], 0
mov qword [rsp + 0x70], 0
mov qword [rsp + 0x78], 0
mov qword [rsp + 0x80], 0
mov qword [rsp + 0x88], 0
mov qword [rsp + 0x64], rax
mov qword [rsp + 0x58], 0
call fcn.0043d5c0
lea rax, str.127.0.0.1
test rbx, rbx
lea r9, [rsp + 0x48]
lea r8, [rsp + 0x60]
mov rdx, rbp
cmove rbx, rax
mov rcx, rbx
call qword [sym.imp.WS2_32.dll_getaddrinfo]
test eax, eax
jne 0x43f114
mov rbx, qword [rsp + 0x48]
test rbx, rbx
je 0x43f195
movsxd r13, edi
mov rbp, qword [sym.imp.WS2_32.dll_connect]
jmp 0x43eeb6
call fcn.0043d730
test eax, eax
je 0x43eec8
mov rbx, qword [rbx + 0x28]
test rbx, rbx
je 0x43f190
mov rdx, qword [rbx + 0x20]
mov r8d, dword [rbx + 0x10]
mov rcx, r13
call rbp
cmp eax, 0xffffffff
je 0x43eea0
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.WS2_32.dll_freeaddrinfo]
lea rdx, [rsp + 0x38]
mov dword [rsi + 0x5f8], edi
xor r9d, r9d
mov qword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
mov r8d, 4
mov ecx, edi
mov dword [rsp + 0x38], 1
call fcn.0043e9d0
test al, al
mov ebx, eax
je 0x43f1b0
lea rdx, [rsp + 0x3c]
xor r9d, r9d
mov qword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
mov r8d, 4
mov ecx, edi
mov dword [rsp + 0x3c], 0
call fcn.0043ec70
test al, al
mov ebx, eax
je 0x43f0e0
mov edx, dword [rsp + 0x3c]
test edx, edx
je 0x43f1f0
lea rdx, [rsp + 0x40]
xor r9d, r9d
mov qword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
mov r8d, 4
mov ecx, edi
mov dword [rsp + 0x40], 0
call fcn.0043ec70
test al, al
mov ebx, eax
je 0x43f0e0
mov rcx, qword [rsp + 0xf0]
call sub.msvcrt.dll_strlen
mov rdx, qword [rsp + 0xf0]
mov ecx, dword [rsp + 0x40]
mov r8d, eax
call fcn.0043e6a0
lea rdx, [rsp + 0x50]
xor r9d, r9d
mov qword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
mov r8d, 8
mov ecx, edi
mov qword [rsp + 0x50], rax
call fcn.0043e9d0
test al, al
mov ebx, eax
je 0x43f1b0
lea rdx, [rsp + 0x44]
xor r9d, r9d
mov qword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
mov r8d, 4
mov ecx, edi
mov dword [rsp + 0x44], 0
call fcn.0043ec70
test al, al
mov ebx, eax
je 0x43f0e0
mov eax, dword [rsp + 0x44]
test eax, eax
je 0x43f216
lea rdx, [rsp + 0xf8]
xor r9d, r9d
mov qword [rsp + 0x28], r12
mov qword [rsp + 0x20], rsi
mov r8d, 4
mov ecx, edi
call fcn.0043e9d0
test al, al
mov ebx, eax
je 0x43f1b0
lea rdx, [rsp + 0x100]
xor r9d, r9d
mov qword [rsp + 0x28], r12
mov qword [rsp + 0x20], rsi
mov r8d, 4
mov ecx, edi
call fcn.0043e9d0
test al, al
mov ebx, eax
je 0x43f1b0
lea rdx, [rsp + 0x108]
xor r9d, r9d
mov qword [rsp + 0x28], r12
mov qword [rsp + 0x20], rsi
mov r8d, 8
mov ecx, edi
call fcn.0043e9d0
test al, al
mov ebx, eax
je 0x43f1b0
mov rdx, qword [rsp + 0x110]
xor r9d, r9d
mov qword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
mov r8d, 8
mov ecx, edi
call fcn.0043ec70
test al, al
mov ebx, eax
jne 0x43f147
call qword [sym.imp.msvcrt.dll__errno]
mov ecx, dword [rax]
call sub.msvcrt.dll_strerror
mov rsi, rax
call qword [sym.imp.msvcrt.dll___iob_func]
lea r8, str.brain_recv:__s_n
lea rcx, [rax + 0x60]
mov r9, rsi
xor edx, edx
call fcn.0043d670
mov ecx, edi
call sub.msvcrt.dll__close
jmp 0x43f147
mov ecx, eax
call fcn.00527de0
mov rsi, rax
call qword [sym.imp.msvcrt.dll___iob_func]
lea r8, str._s:__s_n
lea rcx, [rax + 0x60]
mov r9, rbx
xor edx, edx
mov qword [rsp + 0x20], rsi
xor ebx, ebx
call fcn.0043d670
mov ecx, edi
call sub.msvcrt.dll__close
mov eax, ebx
add rsp, 0x98
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
ret
call qword [sym.imp.msvcrt.dll__errno]
mov ecx, dword [rax]
call sub.msvcrt.dll_strerror
mov rbx, rax
call qword [sym.imp.msvcrt.dll___iob_func]
lea r8, str.socket:__s_n
lea rcx, [rax + 0x60]
mov r9, rbx
xor edx, edx
xor ebx, ebx
call fcn.0043d670
jmp 0x43f147
mov rbx, qword [rsp + 0x48]
mov rcx, rbx
xor ebx, ebx
call qword [sym.imp.WS2_32.dll_freeaddrinfo]
mov ecx, edi
call sub.msvcrt.dll__close
jmp 0x43f147
call qword [sym.imp.msvcrt.dll__errno]
mov ecx, dword [rax]
call sub.msvcrt.dll_strerror
mov rsi, rax
call qword [sym.imp.msvcrt.dll___iob_func]
lea r8, str.brain_send:__s_n
lea rcx, [rax + 0x60]
mov r9, rsi
xor edx, edx
call fcn.0043d670
mov ecx, edi
call sub.msvcrt.dll__close
jmp 0x43f147
call qword [sym.imp.msvcrt.dll___iob_func]
lea r8, str.Invalid_brain_server_version_n
lea rcx, [rax + 0x60]
xor edx, edx
xor ebx, ebx
call fcn.0043d670
mov ecx, edi
call sub.msvcrt.dll__close
jmp 0x43f147
call qword [sym.imp.msvcrt.dll___iob_func]
lea r8, str.Invalid_brain_server_password_n
lea rcx, [rax + 0x60]
jmp 0x43f201