Function at 0x100410dd0
Capabilities:
Reference sql statements

Disassembly:
push rdi
push r13
push r15
sub rsp, 0x470
mov rax, qword [0x100499010]
xor rax, rsp
mov qword [rsp + 0x440], rax
mov r15, rdx
mov rdi, rcx
xor r13d, r13d
lea rcx, [rsp + 0x240]
xor edx, edx
mov qword [rsp + 0x38], r13
mov r8d, 0x200
mov dword [rsp + 0x30], r13d
call sub.VCRUNTIME140.dll_memset
xor edx, edx
lea rcx, [rsp + 0x40]
mov r8d, 0x200
call sub.VCRUNTIME140.dll_memset
test rdi, rdi
je 0x1004110e6
test r15, r15
je 0x1004110e6
mov qword [rsp + 0x460], rsi
mov qword [rsp + 0x450], r14
mov r14, r15
cmp word [r15], r13w
je 0x100411027
movzx eax, word [0x100472a8c]
mov esi, r13d
cmp ax, word [0x100472a84]
mov qword [rsp + 0x468], rbp
jne 0x100410e87
movzx eax, word [0x100472a8e]
cmp ax, word [0x100472a86]
je 0x100410ffd
lea rdx, [0x100472a8c]
mov rcx, r15
call qword [sym.imp.VCRUNTIME140.dll_wcsstr]
test rax, rax
je 0x100410ffd
mov ecx, 0x202
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov rsi, rax
test rax, rax
je 0x100410ffd
xor edx, edx
lea rcx, [rsp + 0x40]
mov r8d, 0x200
call sub.VCRUNTIME140.dll_memset
xor edx, edx
mov r8d, 0x200
mov rcx, rsi
call sub.VCRUNTIME140.dll_memset
lea rdx, [0x100472a8c]
mov rcx, r15
call qword [sym.imp.VCRUNTIME140.dll_wcsstr]
mov rbp, 0xffffffffffffffff
test rax, rax
je 0x100410fbc
mov qword [rsp + 0x4a0], rbx
sub rax, r15
mov qword [rsp + 0x458], r12
mov r8, r15
sar rax, 1
mov edx, 0x202
movsxd r12, eax
mov rcx, rsi
lea rbx, [r12 + r12]
mov r9, rbx
call fcn.10044c240
mov rcx, rbp
mov word [rbx + rsi], r13w
inc rcx
cmp word [rsi + rcx*2], r13w
jne 0x100410f31
lea rdx, [rsp + 0x40]
mov rax, rbp
inc rax
cmp word [rdx + rax*2], r13w
jne 0x100410f43
add rax, 2
add rax, rcx
cmp rax, 0x100
jae 0x100410fac
mov r8, rsi
lea rcx, [rsp + 0x40]
mov edx, 0x200
call fcn.10042b640
lea r8, [0x100472a84]
mov edx, 0x200
lea rcx, [rsp + 0x40]
call fcn.10042b640
lea r14, [r14 + r12*2]
add r14, 2
lea rdx, [0x100472a8c]
mov rcx, r14
call qword [sym.imp.VCRUNTIME140.dll_wcsstr]
test rax, rax
je 0x100410fac
sub rax, r14
mov r8, r14
jmp 0x100410f0f
mov rbx, qword [rsp + 0x4a0]
mov r12, qword [rsp + 0x458]
cmp word [r14], r13w
je 0x10041100f
mov rax, rbp
inc rax
cmp word [r14 + rax*2], r13w
jne 0x100410fc5
lea rcx, [rsp + 0x40]
inc rbp
cmp word [rcx + rbp*2], r13w
jne 0x100410fd4
add rax, rbp
cmp rax, 0x100
jae 0x10041100f
mov r8, r14
lea rcx, [rsp + 0x40]
mov edx, 0x100
call fcn.10040d600
jmp 0x10041100f
mov r8, r15
lea rcx, [rsp + 0x40]
mov edx, 0x200
call fcn.10040b320
mov rbp, qword [rsp + 0x468]
test rsi, rsi
je 0x100411039
mov rcx, rsi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
jmp 0x100411039
mov r8, r15
lea rcx, [rsp + 0x40]
mov edx, 0x200
call fcn.10040b320
lea r9, [rsp + 0x40]
mov edx, 0x100
lea r8, str.IF__EXISTS__SELECT__FROM_master.dbo.sysdatabases_WHERE__name__N_s____SELECT_1_ELSE_SELECT_0
lea rcx, [rsp + 0x240]
call fcn.10040b460
mov r14, qword [rsp + 0x450]
mov rsi, qword [rsp + 0x460]
nop word [rax + rax]
lea rdx, [rsp + 0x240]
mov rcx, rdi
call qword [sym.imp.SQLSVC.dll_QSQLExecDirect]
cmp eax, 1
je 0x100411110
xor r8d, r8d
mov dword [rsp + 0x20], eax
lea r9, [rsp + 0x240]
lea rdx, str.Query:__s__Exec_Result:__d
lea ecx, [r8 + 2]
call fcn.100432180
cmp dword [0x1004a9184], r13d
je 0x1004110ba
mov rcx, rdi
call fcn.100410d30
xor edx, edx
mov r9, r15
mov r8d, 0x189
lea ecx, [rdx + 1]
call fcn.100432180
mov rcx, qword [0x1004a90e0]
mov edx, 0x7530
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
je 0x100411070
xor eax, eax
mov rcx, qword [rsp + 0x440]
xor rcx, rsp
call fcn.100469360
add rsp, 0x470
pop r15
pop r13
pop rdi
ret
mov edx, 1
lea rax, [rsp + 0x38]
mov qword [rsp + 0x28], rax
mov rcx, rdi
lea rax, [rsp + 0x30]
mov qword [rsp + 0x20], rax
lea r9d, [rdx + 3]
lea r8d, [rdx - 0x11]
call qword [sym.imp.SQLSVC.dll_QSQLBind]
nop word [rax + rax]
mov rcx, rdi
call qword [sym.imp.SQLSVC.dll_QSQLNextRow]
cmp eax, 0xffffffff
je 0x100411140
mov rcx, rdi
call qword [sym.imp.SQLSVC.dll_QSQLPurgeResults]
mov rcx, rdi
call qword [sym.imp.SQLSVC.dll_QSQLResults]
cmp eax, 1
je 0x100411110
mov eax, dword [rsp + 0x30]
jmp 0x1004110e8