Function at 0x140051a80
Capabilities:
Receive data
Receive data on socket
Send data
Send data on socket

Disassembly:
push rbp
push rbx
push rdi
lea rbp, [rsp - 0x4080]
mov eax, 0x4180
call fcn.1401bb880
sub rsp, rax
mov rax, qword [0x140264330]
xor rax, rsp
mov qword [rbp + 0x4060], rax
mov ebx, dword [0x140264ca8]
mov rdi, qword [0x1402eb088]
test ebx, ebx
jne 0x140051ad7
cmp dword [0x1402d4dbc], ebx
je 0x140051ad7
lea rdx, str.API_disabled
lea ecx, [rbx + 4]
call fcn.140041b60
jmp 0x1400521f3
mov qword [rsp + 0x41a0], rsi
mov qword [rsp + 0x41a8], r12
mov qword [rsp + 0x41b0], r13
mov qword [rsp + 0x4170], r15
lea r13, str.___API_will_not_be_available
test rdi, rdi
je 0x140051b25
call fcn.140051740
cmp dword [reloc.WS2_32.dll_accept], 0
jne 0x140051b25
lea rdx, str.API_not_running__no_valid_IPs_specified__s
mov r8, r13
mov ecx, 1
call fcn.140041b60
mov edx, 8
lea ecx, [rdx - 7]
call qword [sym.imp.MSVCR120.dll_calloc]
mov ecx, 0x3e8
mov r12, rax
call qword [sym.imp.KERNEL32.dll_Sleep]
xor r8d, r8d
mov esi, 2
lea edx, [r8 + 1]
mov ecx, esi
call qword [sym.imp.WS2_32.dll_socket]
mov r15, rax
mov qword [r12], rax
cmp rax, 0xffffffffffffffff
jne 0x140051b89
call qword [sym.imp.MSVCR120.dll__errno]
mov ecx, dword [rax]
call qword [sym.imp.MSVCR120.dll_strerror]
lea rdx, str.API_initialisation_failed___s__s
mov r9, r13
mov r8, rax
xor ecx, ecx
call fcn.140041b60
jmp 0x1400521d3
xor eax, eax
mov rcx, rdi
mov qword [rsp + 0x38], rax
mov word [rsp + 0x38], si
mov qword [rsp + 0x40], rax
call qword [sym.imp.WS2_32.dll_inet_addr]
mov dword [rsp + 0x3c], eax
cmp eax, 0xffffffff
jne 0x140051bd3
call qword [sym.imp.MSVCR120.dll__errno]
mov ecx, dword [rax]
call qword [sym.imp.MSVCR120.dll_strerror]
lea rdx, str.API_initialisation_2_failed___s__s
mov r9, r13
mov r8, rax
xor ecx, ecx
call fcn.140041b60
jmp 0x1400521d3
movzx ecx, bx
call qword [sym.imp.WS2_32.dll_htons]
xor ecx, ecx
mov word [rsp + 0x3a], ax
call qword [sym.imp.MSVCR120.dll__time64]
mov rsi, rax
nop dword [rax]
lea rdx, [rsp + 0x38]
mov r8d, reloc.WS2_32.dll_recv
mov rcx, r15
call qword [sym.imp.WS2_32.dll_bind]
test eax, eax
jns 0x140051ce3
call qword [sym.imp.MSVCR120.dll__errno]
mov ecx, dword [rax]
call qword [sym.imp.MSVCR120.dll_strerror]
xor ecx, ecx
mov rdi, rax
call qword [sym.imp.MSVCR120.dll__time64]
sub rax, rsi
cmp rax, 0x3d
jg 0x140051cb8
cmp dword [0x140264ca8], 0xfe4
jne 0x140051c81
cmp dword [0x1402d4dbc], 0
je 0x140051c60
movzx r8d, bx
lea rdx, str.API_bind_to_port__d_failed__trying_port__u
mov ecx, 4
lea r9d, [r8 + 1]
call fcn.140041b60
inc bx
movzx ecx, bx
call qword [sym.imp.WS2_32.dll_htons]
mov ecx, 0x3e8
mov word [rsp + 0x3a], ax
call qword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x140051bf0
cmp dword [0x1402d4ec0], 0
je 0x140051c93
cmp dword [0x1402d4dbc], 0
je 0x140051ca8
lea rdx, str.API_bind_to_port__u_failed___trying_again_in_20sec
movzx r8d, bx
mov ecx, 1
call fcn.140041b60
mov ecx, 0x4e20
call qword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x140051bf0
lea rdx, str.API_bind_to_port__d_failed___s__s
movzx r8d, bx
mov r9, rdi
mov ecx, 1
mov qword [rsp + 0x20], r13
call fcn.140041b60
mov rcx, r12
call qword [sym.imp.MSVCR120.dll_free]
jmp 0x1400521d3
mov r8d, dword [0x140264ca8]
movzx ebx, bx
cmp r8d, ebx
je 0x140051d0c
lea rdx, str.API_bind_to_port__d_failed___using_port__u
mov r9d, ebx
mov ecx, 1
call fcn.140041b60
mov dword [0x140264ca8], ebx
mov edx, 0xa
mov rcx, r15
call qword [sym.imp.WS2_32.dll_listen]
cmp eax, 0xffffffff
jne 0x140051d58
call qword [sym.imp.MSVCR120.dll__errno]
mov ecx, dword [rax]
call qword [sym.imp.MSVCR120.dll_strerror]
lea rdx, str.API_initialisation_3_failed___s__s
mov r9, r13
mov r8, rax
xor ecx, ecx
call fcn.140041b60
mov rcx, r15
call qword [sym.imp.WS2_32.dll_closesocket]
mov rcx, r12
call qword [sym.imp.MSVCR120.dll_free]
jmp 0x1400521d3
mov edx, 0x4001
mov ecx, 1
mov qword [rsp + 0x4178], r14
call qword [sym.imp.MSVCR120.dll_calloc]
cmp dword [0x1402d89f8], 0
mov qword [0x1402eacc8], rax
jne 0x1400521ac
lea rsi, str.Accepted
nop dword [rax + rax]
mov eax, dword [0x1402d4f7c]
test eax, eax
jne 0x1400521ac
lea r8, [rsp + 0x30]
lea rdx, [rsp + 0x48]
mov rcx, r15
mov dword [rsp + 0x30], reloc.WS2_32.dll_recv
call qword [sym.imp.WS2_32.dll_accept]
mov r14, rax
cmp rax, 0xffffffffffffffff
je 0x14005218a
mov ecx, dword [rsp + 0x4c]
xor ebx, ebx
call qword [sym.imp.WS2_32.dll_inet_ntoa]
lea ecx, [rbx + 0x52]
mov rdi, rax
call qword [sym.imp.MSVCR120.dll_toupper]
cmp qword [0x1402eb088], rbx
je 0x140051e25
mov ecx, dword [rsp + 0x4c]
call qword [sym.imp.WS2_32.dll_htonl]
mov r9d, dword [reloc.WS2_32.dll_accept]
xor r8d, r8d
test r9d, r9d
jle 0x140051e39
mov rdx, qword [0x1402d89f0]
mov ecx, dword [rdx + 4]
and ecx, eax
cmp ecx, dword [rdx]
je 0x140051e1e
inc r8d
add rdx, 0xc
cmp r8d, r9d
jl 0x140051e07
jmp 0x140051e39
mov ebx, 1
jmp 0x140051e39
lea rdx, str.127.0.0.1
mov rcx, rdi
call sub.MSVCR120.dll_strcmp
test eax, eax
sete bl
cmp dword [0x1402d4dbc], 0
je 0x140051e6c
cmp dword [0x1402d4cd4], 0
je 0x140051e6c
test ebx, ebx
lea r9, str.Ignored
lea rdx, str.API:_connection_from__s____s
mov r8, rdi
mov ecx, 4
cmovne r9, rsi
call fcn.140041b60
test ebx, ebx
je 0x14005217b
lea rdx, [rbp + 0x60]
xor r9d, r9d
mov r8d, 0x400
mov rcx, r14
xor esi, esi
call qword [sym.imp.WS2_32.dll_recv]
xor edx, edx
movsxd rbx, eax
cmp ebx, 0xffffffff
sete dl
test edx, edx
je 0x140051ea1
mov byte [rbp + 0x60], sil
jmp 0x140051eec
test eax, eax
jle 0x140051eec
lea rcx, [rbp + 0x60]
cmp byte [rcx + rbx - 1], 0xa
jne 0x140051eec
dec ebx
movsxd rax, ebx
cmp rax, 0x4000
jae 0x140052213
mov byte [rbp + rax + 0x60], sil
test ebx, ebx
jle 0x140051eec
movsxd rax, ebx
cmp byte [rcx + rax - 1], 0xd
jne 0x140051eec
lea eax, [rbx - 1]
movsxd rcx, eax
cmp rcx, 0x4000
jae 0x14005220d
mov byte [rbp + rcx + 0x60], sil
movsxd rax, ebx
cmp rax, 0x4000
jae 0x140052219
mov byte [rbp + rax + 0x60], sil
test edx, edx
jne 0x140052174
lea rdx, str.GET__
lea rcx, [rbp + 0x60]
call qword [sym.imp.MSVCR120.dll_strstr]
mov rdi, rax
test rax, rax
je 0x140052006
or rcx, 0xffffffffffffffff
nop dword [rax]
inc rcx
cmp byte [rax + rcx], sil
jne 0x140051f30
cmp rcx, 5
jbe 0x140052006
lea rcx, [rsp + 0x61]
xor edx, edx
mov r8d, 0xff
mov byte [rsp + 0x60], sil
call sub.MSVCR120.dll_memset
lea rcx, [rdi + 5]
lea r8, [rsp + 0x60]
lea rdx, [0x14024a7c0]
call qword [sym.imp.MSVCR120.dll_sscanf]
lea rcx, [rsp + 0x60]
mov edx, 0x2f
call qword [sym.imp.MSVCR120.dll_strchr]
test rax, rax
je 0x140051f88
mov byte [rax], 0x7c
lea rcx, [rsp + 0x60]
mov edx, 0x2f
call qword [sym.imp.MSVCR120.dll_strchr]
test rax, rax
je 0x140051fa0
mov byte [rax], sil
lea rdx, str.Sec_WebSocket_Key
mov rcx, rdi
call qword [sym.imp.MSVCR120.dll_strstr]
mov rsi, rax
test rax, rax
je 0x140051fee
mov edx, reloc.WS2_32.dll_listen
mov rcx, rax
call qword [sym.imp.MSVCR120.dll_strchr]
test rax, rax
je 0x140051fce
mov byte [rax], 0
mov edx, 0x3a
mov rcx, rsi
call qword [sym.imp.MSVCR120.dll_strchr]
cmp byte [rax + 1], 0x20
lea rsi, [rax + 1]
jne 0x140051fee
inc rsi
cmp byte [rsi], 0x20
je 0x140051fe6
lea r8, [rsp + 0x60]
lea rdx, [0x1402493f4]
lea rcx, [rbp + 0x60]
call qword [sym.imp.MSVCR120.dll_sprintf]
mov ebx, eax
lea rcx, [rbp + 0x60]
mov edx, 0x7c
call qword [sym.imp.MSVCR120.dll_strchr]
mov rdi, rax
test rax, rax
je 0x140052023
mov byte [rax], 0
inc rdi
cmp dword [0x1402d4dbc], 0
je 0x14005205c
cmp dword [0x1402d4cd4], 0
je 0x14005205c
test ebx, ebx
jle 0x14005205c
test rdi, rdi
lea r9, [0x1401de1a2]
lea r8, [rbp + 0x60]
lea rdx, str.API:_exec_command__s__s_
mov ecx, 4
cmovne r9, rdi
call fcn.140041b60
lea rbx, str.summary
xor r10d, r10d
xor r11d, r11d
mov r9, rbx
nop dword [rax]
mov r8, qword [r9]
lea rax, [rbp + 0x60]
sub r8, rax
nop word [rax + rax]
movzx edx, byte [rax]
movzx ecx, byte [rax + r8]
sub edx, ecx
jne 0x140052093
inc rax
test ecx, ecx
jne 0x140052080
test edx, edx
jne 0x1400520ae
lea rcx, [rbp + 0x60]
or rax, 0xffffffffffffffff
nop
inc rax
cmp byte [rcx + rax], 0
jne 0x1400520a0
test rax, rax
jne 0x1400520c6
inc r10d
inc r11
add r9, 0x10
movsxd rax, r10d
cmp rax, 0xb
jb 0x140052070
jmp 0x14005216b
test rdi, rdi
je 0x140052110
or rax, 0xffffffffffffffff
nop
inc rax
cmp byte [rdi + rax], 0
jne 0x1400520d0
test rax, rax
je 0x140052110
or rax, 0xffffffffffffffff
cmp byte [rdi + rax + 1], 0
lea rax, [rax + 1]
jne 0x1400520e2
cmp byte [rax + rdi - 1], 0x7c
jne 0x140052110
or rax, 0xffffffffffffffff
nop dword [rax + rax]
cmp byte [rdi + rax + 1], 0
lea rax, [rax + 1]
jne 0x140052100
mov byte [rax + rdi - 1], 0
add r11, r11
mov rcx, rdi
call qword [rbx + r11*reloc.WS2_32.dll_htonl + 8]
mov rdx, rax
test rsi, rsi
je 0x140052130
mov r8, rsi
mov rcx, r14
call fcn.1400514d0
jmp 0x14005216b
test rax, rax
jne 0x140052142
lea r8d, [rax + 1]
lea rdx, [0x1401de1a2]
jmp 0x14005215f
or rax, 0xffffffffffffffff
nop word [rax + rax]
cmp byte [rdx + rax + 1], 0
lea rax, [rax + 1]
jne 0x140052150
lea r8d, [rax + 1]
xor r9d, r9d
mov rcx, r14
call qword [sym.imp.WS2_32.dll_send]
mov rcx, r14
call qword [sym.imp.WS2_32.dll_closesocket]
lea rsi, str.Accepted
cmp dword [0x1402d89f8], 0
je 0x140051d90
jmp 0x1400521ac
call qword [sym.imp.MSVCR120.dll__errno]
mov ecx, dword [rax]
call qword [sym.imp.MSVCR120.dll_strerror]
lea rdx, str.API_failed___s__s
mov r9, r13
mov r8, rax
xor ecx, ecx
call fcn.140041b60
mov rcx, r15
call qword [sym.imp.WS2_32.dll_closesocket]
mov rcx, r12
call qword [sym.imp.MSVCR120.dll_free]
mov rcx, qword [0x1402eacc8]
call qword [sym.imp.MSVCR120.dll_free]
mov r14, qword [rsp + 0x4178]
mov r13, qword [rsp + 0x41b0]
mov r12, qword [rsp + 0x41a8]
mov rsi, qword [rsp + 0x41a0]
mov r15, qword [rsp + 0x4170]
mov rcx, qword [rbp + 0x4060]
xor rcx, rsp
call fcn.1401bb2c0
add rsp, 0x4180
pop rdi
pop rbx
pop rbp
ret
call fcn.1401bb454
int3
call fcn.1401bb454
int3
call fcn.1401bb454
int3