Function at 0x180025150
Capabilities:
Get socket status
Make an http request with a cookie
Receive data
Receive data on socket
Send data
Send data on socket
Send http request

Disassembly:
push rbp
push rdi
push r12
push r15
lea rbp, [rsp - 0x22288]
mov eax, 0x22388
call fcn.18002add0
sub rsp, rax
mov rax, qword [0x1800990e0]
xor rax, rsp
mov qword [rbp + 0x22270], rax
xor eax, eax
xor edi, edi
mov r15, rcx
mov rcx, qword [0x1800990a8]
lea r12d, [rdi + 1]
lea rdx, [rbp + 0x270]
xor r9d, r9d
mov r8d, 0x8000
mov qword [rsp + 0x48], r12
mov dword [rsp + 0x50], r12d
mov dword [rsp + 0x40], 1
mov byte [rbp + 0x160], dil
mov qword [rbp + 0x161], rax
mov dword [rbp + 0x169], eax
mov word [rbp + 0x16d], ax
mov byte [rbp + 0x16f], al
mov qword [rsp + 0x58], rcx
call qword [sym.imp.WS2_32.dll_recv]
cmp eax, 0xffffffff
jne 0x18002520b
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
lea rcx, str.recv___failed:_socket_error__d_n
mov edx, eax
call fcn.18002aa50
mov rcx, qword [0x1800990a8]
call qword [sym.imp.WS2_32.dll_closesocket]
mov eax, r12d
jmp 0x18002599a
test eax, eax
jne 0x18002521e
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
lea rcx, str.recv___failed:_error__d_n
jmp 0x1800251ef
movsxd rcx, eax
cmp rcx, 0x8000
jae 0x1800259bd
mov byte [rbp + rcx + 0x270], dil
lea rdx, [0x18007df9c]
lea rcx, [rbp + 0x270]
mov qword [rsp + 0x223b8], rbx
mov qword [rsp + 0x223c0], rsi
call fcn.180028678
or rbx, 0xffffffffffffffff
mov rsi, rax
test rax, rax
je 0x1800252a8
lea rax, [rbp + 0x270]
mov r9, rsi
lea edx, [rbx + 0x11]
sub r9, rax
lea r8, [rbp + 0x270]
lea rcx, [rbp + 0x160]
cmp r9, rdx
jb 0x18002528b
mov r9, rbx
call fcn.18002a5b4
lea r8, [rsi + 1]
lea rcx, [rbp + 0x270]
mov r9, rbx
mov edx, 0x8000
call fcn.18002a5b4
cmp dword [0x18009caf4], 5
jl 0x1800252c4
lea rdx, [rbp + 0x270]
lea rcx, str.Handling_connection:____s___n
call fcn.1800169b0
lea rdx, [0x18007e354]
lea rcx, [rbp + 0x270]
call fcn.180028678
test rax, rax
je 0x180025334
mov rcx, rdi
lea rdx, [rbp + 0x160]
lea r8, [0x18007e538]
nop dword [rax]
movzx eax, byte [rdx + rcx]
inc rcx
cmp al, byte [r8 + rcx - 1]
jne 0x1800253b4
cmp rcx, 5
jne 0x1800252f0
lea rdx, [0x18007e540]
lea rcx, [rbp + 0x270]
call fcn.180028678
lea rdx, [0x18007dfac]
lea rcx, [rax + 4]
call fcn.180028678
test rax, rax
jne 0x1800253b4
mov ecx, 0x1f4
call qword [sym.imp.KERNEL32.dll_Sleep]
lea rax, [rsp + 0x48]
lea rdx, [rsp + 0x50]
xor r9d, r9d
xor r8d, r8d
xor ecx, ecx
mov qword [rsp + 0x20], rax
call qword [sym.imp.WS2_32.dll_select]
test eax, eax
jle 0x180025964
mov rcx, qword [0x1800990a8]
lea rdx, [rbp + 0x1a270]
xor r9d, r9d
mov r8d, 0x8000
call qword [sym.imp.WS2_32.dll_recv]
movsxd rcx, eax
cmp rcx, 0x8000
jae 0x1800259b7
mov byte [rbp + rcx + 0x1a270], dil
lea r8, [rbp + 0x1a270]
lea rcx, [rbp + 0x270]
mov r9, rbx
mov edx, 0x8000
call fcn.180029f1c
lea rdx, str.Authorization:_Digest
lea rcx, [rbp + 0x270]
mov qword [rsp + 0x22380], r14
xor r14b, r14b
call fcn.180028678
mov rsi, rax
test rax, rax
jne 0x1800253fc
cmp dword [0x1800990b0], edi
je 0x1800253fc
lea rdx, str.Authorization:_Basic
lea rcx, [rbp + 0x270]
movzx r14d, r12b
call fcn.180028678
mov rsi, rax
lea rcx, [0x18009fd50]
mov rax, rbx
inc rax
cmp byte [rcx + rax], dil
jne 0x180025406
test rax, rax
je 0x18002553e
test rsi, rsi
jne 0x1800254b8
lea r14, [0x18009fc80]
lea edx, [rsi + 0x40]
mov rcx, r14
call fcn.1800235a0
lea edx, [rsi + 0x40]
lea rsi, [0x18009fcc0]
mov rcx, rsi
call fcn.1800235a0
cmp dword [0x18009caf4], 5
jl 0x18002545a
lea rcx, str.Requesting_Auth:_no_password
call fcn.1800169b0
cmp byte [0x18009fd44], dil
mov qword [rsp + 0x38], rsi
lea rcx, str._staleTRUE_
mov qword [rsp + 0x30], r14
lea rax, [0x18007df9f]
lea r9, str.HTTP_1.0_401_Unauthorized_r_nConnection:_close_r_nContent_Type:_text_html_r_nServer:_SNARE_r_n_sWWW_Authenticate:_Digest_realm_SNARE___qop_auth___s_nonce__s___opaque__s__r_n_r_n_HTML__HEAD__r_n_TITLE_401_Authorization_Required__TITLE__r_n__HEAD__BODY__r_n_H2_Authorization_Required__H2__r_nSnare_could_not_verify_that_you_are_authorized_to_access_the_remote_control_facility._You_may_have_supplied_the_wrong_credentials_P__r_n_HR__r_n_ADDRESS_Snare_Server_Remote_Control_facility__ADDRESS__r_n__BODY___HTML__r_n
cmovne rax, rcx
lea rcx, [rbp + 0x8270]
mov r8, rbx
mov qword [rsp + 0x28], rax
lea rax, [0x18007dfa9]
mov edx, 0x8000
mov qword [rsp + 0x20], rax
call fcn.180029e64
mov byte [0x18009fd44], dil
mov r12d, edi
jmp 0x180025867
lea rcx, [rbp + 0x18271]
xor edx, edx
mov r8d, 0x1fff
mov byte [rbp + 0x18270], dil
call fcn.1800292e0
lea rdx, [0x18007dfbc]
mov rcx, rsi
call fcn.180028678
test rax, rax
je 0x18002574c
movzx ecx, r14b
neg cl
sbb rdx, rdx
add rdx, 0x16
add rsi, rdx
sub rax, rsi
cmp rax, 0x2000
jae 0x18002574c
lea rcx, [rbp + 0x18270]
mov r9, rax
mov r8, rsi
mov edx, 0x2000
call fcn.18002a5b4
lea rcx, [rbp + 0x18270]
test r14b, r14b
je 0x180025738
call fcn.180026380
test eax, eax
je 0x18002574c
lea rcx, [rbp + 0x10271]
xor edx, edx
mov r8d, 0x7fff
xor r14b, r14b
mov byte [rbp + 0x10270], dil
call fcn.1800292e0
lea rdx, str._r_nCookie:
lea rcx, [rbp + 0x270]
call fcn.180028678
test rax, rax
je 0x180025620
lea rcx, [rbp + 0x171]
xor edx, edx
mov r8d, 0xff
lea rsi, [rax + 9]
mov byte [rbp + 0x170], dil
call fcn.1800292e0
lea rdx, [0x18007dfe4]
mov rcx, rsi
call fcn.180028678
sub rax, rsi
cmp rax, 0x100
jae 0x180025620
lea rcx, [rbp + 0x170]
mov r9, rax
mov r8, rsi
mov edx, 0x100
call fcn.18002a5b4
lea rdx, str.chtok
lea rcx, [rbp + 0x170]
call fcn.180028678
test rax, rax
je 0x180025620
lea r8, [0x18009fd00]
add rax, 6
sub r8, rax
nop
movzx edx, byte [rax]
movzx ecx, byte [rax + r8]
sub edx, ecx
jne 0x180025603
inc rax
test ecx, ecx
jne 0x1800255f0
test edx, edx
jne 0x180025620
cmp dword [0x18009caf4], 5
jl 0x18002561c
lea rcx, str.CookieMaster:_Success
call fcn.1800169b0
movzx r14d, r12b
lea rdx, str._r_n_r_n
lea rcx, [rbp + 0x270]
call fcn.180028678
test rax, rax
je 0x180025681
lea rsi, [rax + 4]
lea rdx, [0x18007dffc]
mov rcx, rsi
call fcn.180028678
test rax, rax
je 0x180025653
mov byte [rax], dil
lea rdx, [0x18007e014]
mov rcx, rsi
call fcn.180028678
test rax, rax
je 0x18002566a
mov byte [rax], dil
lea rcx, [rbp + 0x10270]
mov r9, rbx
mov r8, rsi
mov edx, 0x8000
call fcn.18002a5b4
lea rdx, [0x18007e034]
lea rcx, [rbp + 0x270]
call fcn.180028678
test rax, rax
je 0x18002569c
mov byte [rax], dil
lea rdx, [0x18007e054]
lea rcx, [rbp + 0x270]
call fcn.180028678
test rax, rax
je 0x1800256b7
mov byte [rax], dil
lea rdx, [0x18007e06c]
lea rcx, [rbp + 0x270]
call fcn.180028678
test rax, rax
je 0x1800256d2
mov byte [rax], dil
mov rcx, rdi
lea rdx, [rbp + 0x160]
lea r8, str.POST
nop dword [rax]
nop word [rax + rax]
movzx eax, byte [rdx + rcx]
inc rcx
cmp al, byte [r8 + rcx - 1]
jne 0x180025774
cmp rcx, 5
jne 0x1800256f0
lea r8d, [rcx - 1]
mov eax, 0xfffffffd
lea rdx, [0x18007e6c8]
lea rcx, [rbp + 0x270]
test r14b, r14b
cmove edi, eax
call fcn.18002a3c0
test eax, eax
jne 0x18002587b
test edi, edi
jne 0x180025824
jmp 0x180025795
lea rdx, [rbp + 0x160]
call fcn.180025a80
test eax, eax
jne 0x18002553e
cmp dword [0x18009caf4], 5
jl 0x180025761
lea rcx, str.Requesting_Auth:_BAD_password
call fcn.1800169b0
lea rsi, [0x18009fcc0]
lea r14, [0x18009fc80]
jmp 0x18002545a
lea rdx, str._set
lea rcx, [rbp + 0x270]
mov r8d, 4
call fcn.18002a3c0
test eax, eax
je 0x18002587b
cmp dword [0x18009caf4], 5
jl 0x1800257b1
lea rdx, [rbp + 0x270]
lea rcx, str.DEBUG:_DATA_chopped__now_decoding...___s_
call fcn.1800169b0
lea rcx, [rbp + 0x270]
call fcn.180024ad0
lea rcx, [rbp + 0x10270]
call fcn.180024ad0
cmp dword [0x18009caf4], 5
jl 0x1800257e5
lea rdx, [rbp + 0x270]
lea rcx, str.DEBUG:_DATA_IN_is_now___s_
call fcn.1800169b0
lea rax, [rsp + 0x40]
lea r8, [rbp + 0x8270]
lea rdx, [rbp + 0x10270]
mov qword [rsp + 0x30], rax
mov rax, qword [0x1800990a8]
lea rcx, [rbp + 0x270]
mov r9d, 0x8000
mov qword [rsp + 0x28], r15
mov qword [rsp + 0x20], rax
call fcn.18001b020
mov edi, eax
test eax, eax
jns 0x180025863
cmp edi, 0xffffffff
jge 0x1800258ab
cmp edi, 0xfffffffe
je 0x18002587b
mov edx, 0x8000
lea rcx, [rbp + 0x8270]
cmp edi, 0xfffffffd
jne 0x18002584e
lea r8, str.Invalid_Change_Token:_Request_denied
jmp 0x18002588e
lea r9, str.Unknown_Error___d_
mov r8, rbx
mov dword [rsp + 0x20], edi
call fcn.180029e64
jmp 0x180025896
test edi, edi
jne 0x1800258ab
lea rax, [rbp + 0x8270]
nop
inc rbx
cmp byte [rax + rbx], 0
jne 0x180025870
jmp 0x1800258a9
lea r8, str.Invalid_Request
mov edx, 0x8000
lea rcx, [rbp + 0x8270]
mov r9, rbx
call fcn.18002a5b4
lea rax, [rbp + 0x8270]
nop dword [rax]
inc rbx
cmp byte [rax + rbx], 0
jne 0x1800258a0
mov edi, ebx
mov r14, qword [rsp + 0x22380]
test edi, edi
jle 0x18002593b
cmp dword [0x18009caf4], 5
jl 0x1800258d0
lea rcx, str.Data_back_from_handlewebpages..
call fcn.1800169b0
test r12d, r12d
je 0x180025905
mov edx, dword [rsp + 0x40]
mov rcx, qword [0x1800990a8]
call fcn.180024320
cmp eax, 0xffffffff
jne 0x180025905
cmp dword [0x18009caf4], 5
jl 0x180025978
lea rcx, [0x18007e798]
call fcn.1800169b0
jmp 0x180025978
mov rcx, qword [0x1800990a8]
lea rdx, [rbp + 0x8270]
xor r9d, r9d
mov r8d, edi
call qword [sym.imp.WS2_32.dll_send]
cmp eax, 0xffffffff
jne 0x18002593b
cmp dword [0x18009caf4], 5
jl 0x180025978
lea rcx, str.send___failed:_SOCKET_ERROR
call fcn.1800169b0
jmp 0x180025978
cmp dword [0x18009caf4], 5
jl 0x180025950
lea rcx, str.Handling_connection_finished_n
call fcn.1800169b0
mov rcx, qword [0x1800990a8]
mov edx, 1
call qword [sym.imp.WS2_32.dll_shutdown]
jmp 0x180025978
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
lea rcx, str.recv___failed:_Incomplete_message___d__n
mov edx, eax
call fcn.18002aa50
mov rcx, qword [0x1800990a8]
call qword [sym.imp.WS2_32.dll_closesocket]
mov rbx, qword [rsp + 0x223b8]
mov rsi, qword [rsp + 0x223c0]
mov eax, 1
mov rcx, qword [rbp + 0x22270]
xor rcx, rsp
call fcn.1800292b0
add rsp, 0x22388
pop r15
pop r12
pop rdi
pop rbp
ret
call fcn.18002a114
int3
call fcn.18002a114
int3