Function at 0x3981283b0
Capabilities:
Send data
Send data on socket

Disassembly:
push r13
push r12
mov r12, r8
push rsi
push rbx
sub rsp, 0x28
mov rbx, qword [r8 + 0xc8]
mov rdx, qword [rbx + 0x118]
mov rax, rbx
test rdx, rdx
je 0x39811a662
xor ecx, ecx
call fcn.3981220a0
mov rax, qword [r12 + 0xc8]
mov eax, dword [rax + 0x44]
cmp dword [r12 + 0x14], eax
jl 0x39811a6d0
mov edx, 0x43
mov rcx, r12
mov r13, qword [r12 + 0x28]
call fcn.398128df0
mov rcx, qword [r12 + 0xc8]
movzx eax, word [r12 + 0xb8]
cdq
idiv dword [rcx + 0x18]
mov rax, qword [rcx]
mov rcx, r12
movsxd rdx, edx
lea rdx, [rax + rdx*8]
call fcn.398128ec0
mov rcx, r13
call fcn.398126e50
mov rdx, qword [rbx + 0x118]
test rdx, rdx
je 0x39811a7a3
add rsp, 0x28
xor ecx, ecx
pop rbx
pop rsi
pop r12
pop r13
jmp fcn.3981220c0
lea rcx, [r12 + 0x40]
call fcn.39811dde0
mov rsi, qword [rbx + 0x10]
cmp qword [rbx + 0x118], 0
mov rax, rsi
je 0x39811a6f4
call fcn.398122050
mov rax, qword [rbx + 0x10]
test rax, rax
je 0x39811a74f
mov edx, dword [rbx + 0x28]
mov rcx, qword [rax + 0x110]
test edx, edx
jne 0x39811a719
jmp 0x39811a7b0
cmp rsi, rax
je 0x39811a7c0
movzx edx, byte [rax + 0x1a0]
mov rcx, rax
mov rax, qword [rax + 0x110]
mov qword [rbx + 0x10], rax
test dl, dl
je 0x39811a710
mov rax, qword [r12 + 0x28]
cmp rax, rcx
je 0x39811a74f
sub dword [rax + 0x1b0], 1
add dword [rcx + 0x1b0], 1
mov qword [r12 + 0x28], rcx
mov rcx, r12
call fcn.39811a7e0
mov rax, qword [r12 + 0x28]
add dword [rax + 0x90], 1
mov rdx, qword [r12 + 0xc8]
mov rax, qword [r12 + 0x28]
mov esi, dword [rdx + 0x48]
cmp dword [rax + 0x90], esi
jle 0x39811a6ad
mov dword [rax + 0x90], 0
mov rcx, qword [r12 + 0x28]
call fcn.398126e50
mov rdx, qword [rbx + 0x118]
test rdx, rdx
jne 0x39811a6bd
add rsp, 0x28
pop rbx
pop rsi
pop r12
pop r13
ret
mov qword [rbx + 0x10], rcx
test rcx, rcx
je 0x39811a74f
jmp 0x39811a732
mov rax, qword [rsi + 0x110]
mov rcx, rsi
mov qword [rbx + 0x10], rax
jmp 0x39811a732
push rbp
mov rbp, rsp
push r15
mov r15, rcx
push r14
push r13
push r12
mov r12d, r8d
push rdi
push rsi
mov rsi, r9
push rbx
mov ebx, edx
and rsp, 0xfffffffffffffff0
sub rsp, 0xa0
mov rax, qword [rcx + 0xc8]
cmp qword [rax + 0x118], 0
je 0x3981283eb
call fcn.398122050
test ebx, 0x20f
jne 0x398128402
test rsi, rsi
je 0x398128402
test byte [rsi + 4], 1
jne 0x398128948
test bh, 2
je 0x398128530
mov edi, 0x41
mov rbx, qword [r15 + 0x28]
mov rax, qword [rbx + 0x198]
cmp qword [r15 + 0xd0], rax
je 0x398128908
mov rax, qword [rbx + 0x1a8]
cmp qword [rax + 0x118], 0
je 0x39812843e
call fcn.398122050
cmp byte [rbx + 0x1a0], 0
jne 0x398128493
lea rcx, [rbx + 0x120]
call fcn.39811dde0
mov rdx, qword [rbx + 0x198]
test rdx, rdx
je 0x398128476
mov rcx, qword [rbx + 0x1a8]
call fcn.3981191c0
mov qword [rbx + 0x198], 0
mov rax, qword [rbx + 0x1a8]
mov byte [rbx + 0x1a0], 1
mov qword [rbx + 0x8c], 0
add dword [rax + 0x28], 1
mov rbx, qword [r15 + 0xd0]
mov r13, qword [rbx + 0x18]
test r13, r13
je 0x3981284e0
cmp byte [r15 + 8], 0xc
je 0x3981284e0
mov r14, qword [rbx]
mov rax, qword [r14 + 0xc8]
cmp qword [rax + 0x118], 0
mov qword [rsp + 0x50], rax
je 0x398128690
call fcn.398122050
mov r13, qword [rbx + 0x18]
test r13, r13
jne 0x398128690
nop dword [rax]
xor r9d, r9d
mov r8d, edi
mov edx, r12d
mov rcx, r15
call fcn.398128cd0
movzx eax, word [r15 + 0xb8]
mov rcx, qword [r15 + 0xc8]
cdq
idiv dword [rcx + 0x18]
mov rax, qword [rcx]
lea rsp, [rbp - 0x38]
mov rcx, r15
pop rbx
pop rsi
pop rdi
pop r12
pop r13
pop r14
pop r15
pop rbp
movsxd rdx, edx
lea rdx, [rax + rdx*8]
jmp fcn.398128ec0
and bx, 0xf
je 0x398128920
sub ebx, 1
cmp bx, 4
ja 0x3981289e8
movzx ebx, bx
lea rax, [0x3981423c0]
mov edi, dword [rax + rbx*4]
cmp edi, 2
je 0x398128a28
lea eax, [rdi - 4]
cmp eax, 1
ja 0x398128410
mov rax, qword [r15 + 0xc8]
mov eax, dword [rax + 0x40]
cmp dword [r15 + 0x10], eax
jge 0x398128493
cmp edi, 5
lea rdx, str.query_not_implemented
lea rcx, [rsp + 0x60]
mov r9d, edi
lea rax, str.refused
lea r8, str.Bad_response__d___s_
cmovne rax, rdx
mov edx, 0x40
mov qword [rsp + 0x20], rax
call fcn.398124700
mov rcx, qword [r15 + 0x28]
call fcn.398126e50
mov rbx, qword [r15 + 0xc8]
mov rsi, qword [r15 + 0x28]
cmp qword [rbx + 0x118], 0
je 0x398128b6a
call fcn.398122050
mov rbx, qword [r15 + 0xc8]
cmp qword [rbx + 0x118], 0
mov r13, qword [rbx + 0x10]
je 0x398128b9f
call fcn.398122050
mov rax, qword [rbx + 0x10]
test rax, rax
je 0x398128b83
mov r8d, dword [rbx + 0x28]
mov rcx, qword [rax + 0x110]
test r8d, r8d
jne 0x398128629
jmp 0x398128b76
cmp r13, rax
je 0x398128b8c
movzx edx, byte [rax + 0x1a0]
mov rcx, rax
mov rax, qword [rax + 0x110]
mov qword [rbx + 0x10], rax
test dl, dl
je 0x398128620
mov rax, qword [r15 + 0x28]
cmp rax, rcx
je 0x39812865d
sub dword [rax + 0x1b0], 1
add dword [rcx + 0x1b0], 1
mov qword [r15 + 0x28], rcx
cmp rsi, rcx
je 0x398128493
add dword [r15 + 0x10], 1
or byte [r15 + 0xbc], 2
mov dword [r15 + 0x14], 0
lea rsp, [rbp - 0x38]
pop rbx
pop rsi
pop rdi
pop r12
pop r13
pop r14
pop r15
pop rbp
ret
mov eax, dword [rbx + 0x14]
xor esi, esi
lea edx, [rax + 1]
mov rax, qword [rbx + 0x20]
mov dword [rbx + 0x14], edx
mov qword [rsp + 0x58], rax
mov rcx, rax
cmp edx, dword [r13 + 8]
jge 0x398128717
mov dword [rsp + 0x48], edx
call sub.msvcrt.dll_strlen
mov rsi, rax
test rax, rax
je 0x3981284e0
mov rax, qword [rsp + 0x58]
movzx eax, byte [rax + rsi - 1]
mov byte [rsp + 0x47], al
mov rax, qword [r13 + 0x10]
test rax, rax
je 0x3981284e0
mov edx, dword [rsp + 0x48]
xor ecx, ecx
test edx, edx
jne 0x3981286fd
jmp 0x398128a60
add rcx, 1
cmp rcx, rdx
je 0x398128a60
mov rax, qword [rax + 8]
test rax, rax
jne 0x3981286f0
jmp 0x3981284e0
lea rcx, [rax + 1]
add esi, 1
mov edx, 0x2e
call sub.msvcrt.dll_strchr
test rax, rax
jne 0x398128710
cmp esi, dword [r13 + 4]
jge 0x3981284e0
mov rax, qword [r14 + 0x18]
movzx r8d, byte [r14 + 8]
xor edx, edx
mov r9, qword [rsp + 0x58]
mov rcx, qword [rsp + 0x50]
mov qword [rsp + 0x28], rax
mov rax, qword [r14 + 0x20]
mov qword [rsp + 0x20], rax
call fcn.398129130
mov r13, rax
test rax, rax
je 0x3981284e0
mov rax, qword [rbx]
mov rax, qword [rax + 0xc8]
cmp qword [rax + 0x118], 0
je 0x39812877d
call fcn.398122050
mov r12, qword [rbx + 0x18]
test r12, r12
je 0x3981287c1
sub dword [r12], 1
jne 0x3981287b9
mov rsi, qword [r12 + 0x10]
test rsi, rsi
je 0x3981287b1
nop word [rax + rax]
mov rcx, rsi
mov rsi, qword [rsi + 8]
call fcn.39811f100
test rsi, rsi
jne 0x3981287a0
mov rcx, r12
call fcn.39811f100
mov qword [rbx + 0x18], 0
mov rcx, qword [rbx + 0x20]
test rcx, rcx
je 0x3981287d7
call fcn.39811f100
mov qword [rbx + 0x20], 0
movzx eax, word [r14 + 0xb8]
mov rsi, qword [r14 + 0xc8]
cdq
idiv dword [rsi + 0x18]
mov rax, qword [rsi]
movsxd rdx, edx
lea rdi, [rax + rdx*8]
mov rdx, qword [rsi + 0x118]
test rdx, rdx
je 0x3981289f8
xor ecx, ecx
call fcn.3981220a0
test rdi, rdi
je 0x398128a01
mov rax, qword [r14 + 0xc8]
cmp qword [rax + 0x118], 0
je 0x39812882a
call fcn.398122050
mov rax, qword [r14 + 0x30]
cmp r14, rax
je 0x398128b35
mov rdx, qword [r14 + 0x38]
mov qword [rax + 0x38], rdx
mov rax, qword [r14 + 0x30]
mov qword [rdx + 0x30], rax
cmp r14, qword [rdi]
je 0x398128b62
pxor xmm0, xmm0
lea rax, [rsi + 8]
lea r12, [r14 + 0x40]
movups xmmword [r14 + 0x30], xmm0
cmp rdi, rax
jne 0x398128a05
sub dword [rsi + 0x30], 1
mov rcx, r12
call fcn.39811da40
mov rax, qword [r14 + 0x28]
test rax, rax
je 0x39812889e
mov ecx, dword [rax + 0x1b0]
test ecx, ecx
jne 0x39812889e
mov rdx, qword [r14 + 0xc8]
mov edx, dword [rdx + 0x120]
test edx, edx
jne 0x398128b41
test byte [r14 + 0xbc], 1
je 0x398128b28
mov rax, qword [r14 + 0xd0]
test rax, rax
je 0x3981288bf
mov qword [rax], 0
mov rcx, r14
call fcn.39811f100
mov rcx, rsi
call fcn.39811a9a0
mov rdx, qword [rsi + 0x118]
test rdx, rdx
je 0x3981288e2
xor ecx, ecx
call fcn.3981220c0
mov qword [rbx], r13
mov rcx, r13
mov qword [r13 + 0xd0], rbx
lea rsp, [rbp - 0x38]
pop rbx
pop rsi
pop rdi
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp fcn.398129660
mov qword [rbx + 0x198], 0
mov rbx, qword [r15 + 0x28]
jmp 0x398128428
mov edi, 0x42
test rsi, rsi
je 0x398128410
movzx eax, byte [rsi + 4]
and eax, 1
cmp al, 1
sbb edi, edi
and edi, 4
add edi, 0x42
jmp 0x398128410
mov r9, rsi
xor r8d, r8d
mov edx, r12d
mov rcx, r15
call fcn.398128cd0
mov rbx, qword [r15 + 0x28]
mov rax, qword [rbx + 0x198]
cmp qword [r15 + 0xd0], rax
je 0x398128a48
mov rax, qword [rbx + 0x1a8]
cmp qword [rax + 0x118], 0
je 0x398128987
call fcn.398122050
cmp byte [rbx + 0x1a0], 0
jne 0x3981284f1
lea rcx, [rbx + 0x120]
call fcn.39811dde0
mov rdx, qword [rbx + 0x198]
test rdx, rdx
je 0x3981289c3
mov rcx, qword [rbx + 0x1a8]
call fcn.3981191c0
mov qword [rbx + 0x198], 0
mov rax, qword [rbx + 0x1a8]
mov byte [rbx + 0x1a0], 1
mov qword [rbx + 0x8c], 0
add dword [rax + 0x28], 1
jmp 0x3981284f1
mov edi, 0x42
jmp 0x398128410
test rdi, rdi
jne 0x39812882a
lea r12, [r14 + 0x40]
mov rcx, r12
call fcn.39811dde0
sub dword [rsi + 0x2c], 1
mov rax, qword [r14 + 0x28]
sub dword [rax + 0x1b0], 1
jmp 0x39812886e
lea rsp, [rbp - 0x38]
mov r8, r15
xor edx, edx
xor ecx, ecx
pop rbx
pop rsi
pop rdi
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp 0x39811a630
mov qword [rbx + 0x198], 0
mov rbx, qword [r15 + 0x28]
jmp 0x398128971
xor edx, edx
cmp byte [rsp + 0x47], 0x2e
movsxd r11, dword [rax]
lea r10, [rax + 0x10]
setne dl
mov qword [rsp + 0x30], r10
add rdx, rsi
mov qword [rsp + 0x38], r11
lea r13, [rdx + r11]
mov qword [rsp + 0x48], rdx
lea rcx, [r13 + 1]
call fcn.39811f120
test rax, rax
je 0x3981284e0
mov rdx, qword [rsp + 0x58]
mov r8, rsi
mov rcx, rax
call sub.msvcrt.dll_memcpy
cmp byte [rsp + 0x47], 0x2e
mov r11, qword [rsp + 0x38]
mov r10, qword [rsp + 0x30]
mov r9, rax
je 0x398128ac1
mov byte [rax + rsi], 0x2e
mov rcx, qword [rsp + 0x48]
mov r8, r11
mov rdx, r10
mov qword [rsp + 0x58], r9
add rcx, r9
call sub.msvcrt.dll_memcpy
mov r9, qword [rsp + 0x58]
mov rcx, qword [rsp + 0x50]
xor edx, edx
mov byte [r9 + r13], 0
mov rax, qword [r14 + 0x18]
movzx r8d, byte [r14 + 8]
mov qword [rsp + 0x28], rax
mov rax, qword [r14 + 0x20]
mov qword [rsp + 0x20], rax
call fcn.398129130
mov rcx, qword [rsp + 0x58]
mov r13, rax
call fcn.39811f100
test r13, r13
jne 0x3981287d7
jmp 0x3981284e0
mov rcx, qword [r14]
call fcn.39811f100
jmp 0x3981288ac
mov qword [rdi], 0
jmp 0x398128850
lea rcx, [rax + 0x98]
call fcn.39811dde0
mov rax, qword [r14 + 0x28]
lea rcx, [rax + 0x120]
call fcn.39811dde0
jmp 0x39812889e
mov qword [rdi], rax
jmp 0x398128850
mov rax, qword [rbx + 0x10]
mov r13, rax
jmp 0x3981285f9
mov qword [rbx + 0x10], rcx
test rcx, rcx
jne 0x398128642
mov rcx, qword [r15 + 0x28]
jmp 0x39812865d
mov rax, qword [r13 + 0x110]
mov rcx, r13
mov qword [rbx + 0x10], rax
jmp 0x398128642
mov rax, r13
jmp 0x3981285f9