Function at 0x140150990
Capabilities:
Encode data using xor

Disassembly:
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rbp
push rbx
push rdi
push r12
push r13
push r15
lea rbp, [rsp - 0x2f]
sub rsp, 0xb8
xor r12d, r12d
lea r8, [rbp + 0x7f]
xor r9d, r9d
lea edx, [r12 + 0x1b]
mov r13, rcx
mov edi, r12d
mov qword [rbp - 0x31], r12
mov r15d, r12d
mov qword [rbp + 0x7f], r12
call fcn.1401582a0
mov ebx, eax
mov dword [rbp + 0x77], eax
test eax, eax
jne 0x140150e0f
movsxd r8, dword [r13 + 0x208]
mov qword [rsp + 0xb0], rsi
mov qword [rsp + 0xa8], r14
mov r14, qword [rbp + 0x7f]
lea edx, [rax + 1]
mov rcx, r14
call fcn.140110cd0
movsxd r8, dword [r13 + 0x1e8]
lea edx, [rbx + 2]
mov rcx, r14
call fcn.140110cd0
nop dword [rax]
mov rcx, r14
call fcn.140113420
cmp eax, 0x64
jne 0x140150a7e
xor edx, edx
mov rcx, r14
call fcn.140114010
mov edi, r12d
mov esi, eax
cmp dword [r13 + 0x1e8], r12d
jle 0x140150a7a
mov r14, qword [rbp - 0x31]
nop dword [rax]
lea r9, [rbp + 0x77]
mov r8d, edi
mov edx, esi
mov rcx, r13
call fcn.140146c30
inc edi
xor r14, rax
cmp edi, dword [r13 + 0x1e8]
jl 0x140150a50
mov ebx, dword [rbp + 0x77]
mov qword [rbp - 0x31], r14
mov r14, qword [rbp + 0x7f]
test ebx, ebx
je 0x140150a20
mov rcx, r14
call fcn.140115080
test ebx, ebx
jne 0x140150dfb
mov ebx, eax
test eax, eax
jne 0x140150dfb
mov rax, qword [r13 + 0x48]
mov rdx, qword [r13 + 0x1b8]
lea rcx, str.SELECT__s
mov rax, qword [rax]
mov rsi, r12
mov qword [rbp - 0x39], r12
mov qword [rbp - 9], rax
call fcn.140121da0
mov rdi, rax
test rax, rax
jne 0x140150acd
lea ebx, [rax + 7]
jmp 0x140150df3
mov rcx, qword [r13 + 0x18]
lea rax, [rbp - 0x39]
mov qword [rsp + 0x30], r12
mov qword [rsp + 0x28], rax
mov r9d, pe_nt_image_headers64
or r8d, 0xffffffff
mov rdx, rdi
mov qword [rsp + 0x20], r12
call fcn.1401a4dd0
mov rcx, rdi
mov ebx, eax
call fcn.140122460
test ebx, ebx
jne 0x140150def
mov rdi, qword [rbp - 0x39]
mov rcx, rdi
lea rsi, [0x140252ab8]
call fcn.140113420
cmp eax, 0x64
jne 0x140150def
test rdi, rdi
je 0x140150b65
mov rax, qword [rdi]
mov rcx, qword [rax + 0x18]
test rcx, rcx
je 0x140150b3b
call qword [0x1404b24f0]
mov rcx, qword [rdi + 0xa8]
test rcx, rcx
je 0x140150b51
cmp r12w, word [rdi + 0xc8]
jb 0x140150b68
mov rcx, qword [rdi]
mov edx, reloc.OLEAUT32.dll_SafeArrayPutElement
mov dword [rcx + 0x50], reloc.OLEAUT32.dll_SafeArrayPutElement
call fcn.14018bb00
mov rcx, rsi
movzx eax, word [rcx + 8]
test al, 0x24
je 0x140150b79
mov rax, qword [rcx]
mov qword [rbp - 0x21], rax
jmp 0x140150ba5
test al, 8
je 0x140150b8c
movsd xmm0, qword [rcx]
call fcn.14013d2d0
mov qword [rbp - 0x21], rax
jmp 0x140150ba5
test al, 0x12
je 0x140150ba1
cmp qword [rcx + 0x10], r12
je 0x140150ba1
call fcn.1401651e0
mov qword [rbp - 0x21], rax
jmp 0x140150ba5
mov qword [rbp - 0x21], r12
test rdi, rdi
je 0x140150bd9
mov rcx, qword [rdi]
mov edx, dword [rdi + 0x38]
cmp byte [rcx + 0x67], r12b
jne 0x140150bbf
test edx, edx
jne 0x140150bbf
mov eax, r12d
jmp 0x140150bc4
call fcn.14012f9a0
mov dword [rdi + 0x38], eax
mov rax, qword [rdi]
mov rcx, qword [rax + 0x18]
test rcx, rcx
je 0x140150bd9
call qword [0x1404b2500]
mov dword [rbp + 0x77], r12d
cmp qword [r13 + 0x58], r12
je 0x140150bf4
mov edx, dword [r13 + 0x30]
mov rcx, rdi
inc edx
call fcn.140114010
mov dword [rbp + 0x77], eax
mov rax, r12
mov r14d, r12d
mov dword [rbp - 0x49], r12d
mov qword [rbp - 1], rax
cmp r14d, dword [r13 + 0x30]
jge 0x140150b0c
mov rcx, qword [r13 + 0x40]
cmp byte [rax + rcx], r12b
jne 0x140150dd9
lea edx, [r14 + 1]
mov rcx, rdi
call fcn.140114200
mov rsi, qword [r13 + 0x48]
lea r9, [rbp - 0x41]
mov rdi, qword [rsi]
or r8d, 0xffffffff
mov rdx, rax
mov rcx, rsi
mov qword [rbp - 0x41], r12
call qword [rdi + reloc.ODBC32.dll_SQLAllocHandle]
mov ebx, eax
test eax, eax
jne 0x140150c76
mov rax, qword [rbp - 0x41]
mov qword [rax], rsi
cmp dword [rdi], 1
mov esi, dword [rbp + 0x77]
jl 0x140150c79
mov rcx, qword [rbp - 0x41]
mov edx, esi
call qword [rdi + 0x30]
mov ebx, eax
test eax, eax
je 0x140150c79
mov rcx, qword [rbp - 0x41]
call qword [rdi + 0x20]
mov rdi, r12
mov qword [rbp - 0x41], r12
jmp 0x140150c7d
mov esi, dword [rbp + 0x77]
mov rdi, qword [rbp - 0x41]
mov qword [rbp + 7], rdi
test ebx, ebx
jne 0x140150dbb
jmp 0x140150c94
mov r14d, dword [rbp - 0x49]
lea rax, [rbp + 0x7f]
lea r9, [rbp - 0x15]
lea r8, [rbp - 0x29]
mov qword [rsp + 0x28], rax
lea rax, [rbp - 0x19]
lea rdx, [rbp + 0xf]
mov qword [rsp + 0x20], rax
mov rax, qword [rbp - 9]
mov rcx, rdi
mov dword [rbp - 0x29], r12d
mov dword [rbp - 0x15], r12d
mov dword [rbp - 0x19], r12d
mov dword [rbp + 0x7f], r12d
call qword [rax + 0x28]
mov ebx, eax
test eax, eax
jne 0x140150db7
mov rax, qword [rbp - 0x21]
movsxd r9, dword [rbp + 0x7f]
mov r11, qword [rbp + 0xf]
lea r13, [rax + rax*8]
movsxd rdx, r14d
mov r14d, dword [rbp - 0x29]
movsxd rax, esi
mov qword [rbp - 0x11], rdx
add r13, rax
imul rcx, r13, 0x51
add rcx, rdx
lea rax, [r9 + rcx*8]
add rcx, rax
test r14d, r14d
jle 0x140150d28
mov rdx, r11
mov r8d, r14d
movsx rax, byte [rdx]
lea rcx, [rcx + rcx*8]
lea rdx, [rdx + 1]
add rcx, rax
dec r8
jne 0x140150d10
mov rdx, qword [rbp - 0x11]
xor r15, rcx
mov rcx, qword [rbp + 0x67]
mov eax, dword [rcx + 0x1e8]
cmp eax, 1
jle 0x140150c90
mov rsi, qword [rcx + 0x1f0]
mov ebx, 1
mov r10d, SQLGetData
lea edi, [rax - 1]
cmp dword [r10 + rsi], r14d
jg 0x140150d9b
lea r8, [rbx + r13*8]
add r8, r13
lea rax, [rdx + r8*8]
mov rdx, r12
add r8, rax
lea rax, [r9 + r8*8]
movsxd r9, dword [r10 + rsi]
add r8, rax
test r9, r9
jle 0x140150d94
nop word [rax + rax]
movsx rcx, byte [rdx + r11]
lea r8, [r8 + r8*8]
inc rdx
add r8, rcx
cmp rdx, r9
jl 0x140150d80
movsxd r9, dword [rbp + 0x7f]
xor r15, r8
mov rdx, qword [rbp - 0x11]
inc rbx
add r10, 0x28
dec rdi
jne 0x140150d53
mov rdi, qword [rbp + 7]
mov esi, dword [rbp + 0x77]
jmp 0x140150c90
mov r13, qword [rbp + 0x67]
test rdi, rdi
je 0x140150dca
mov rax, qword [rbp - 9]
mov rcx, rdi
call qword [rax + 0x20]
mov rdi, qword [rbp - 0x39]
mov rax, qword [rbp - 1]
cmp ebx, 0x65
cmove ebx, r12d
inc r14d
inc rax
mov dword [rbp - 0x49], r14d
mov qword [rbp - 1], rax
test ebx, ebx
je 0x140150c02
mov rsi, qword [rbp - 0x39]
mov rcx, rsi
call fcn.140114f70
mov rdi, qword [rbp - 0x31]
mov rsi, qword [rsp + 0xb0]
mov r14, qword [rsp + 0xa8]
mov rax, qword [rbp + 0x6f]
cmp rdi, r15
sete r12b
mov dword [rax], r12d
mov eax, ebx
add rsp, 0xb8
pop r15
pop r13
pop r12
pop rdi
pop rbx
pop rbp
ret