Function at 0x101bea0
Capabilities:
Create thread

Disassembly:
mov qword [rsp + 0x20], r9
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rdi
sub rsp, 0x8a0
mov rax, qword [0x010667f0]
xor rax, rsp
mov qword [rsp + 0x890], rax
movzx eax, word [0x01001c50]
mov word [rsp + 0x80], ax
lea rax, [rsp + 0x82]
mov rdi, rax
xor eax, eax
mov ecx, 0x7fe
rep stosb byte [rdi], al
mov qword [rsp + 0x60], 0
mov qword [rsp + 0x58], 0
mov dword [rsp + 0x50], 0
mov dword [rsp + 0x880], 0
mov dword [rsp + 0x6c], 0
mov dword [rsp + 0x68], 0
xor r8d, r8d
lea rdx, [rsp + 0x880]
lea rcx, [rsp + 0x6c]
call fcn.01036710
mov dword [rsp + 0x48], 0x400
lea rax, [rsp + 0x80]
mov qword [rsp + 0x40], rax
mov dword [rsp + 0x38], 0
mov qword [rsp + 0x30], 0
mov rax, qword [rsp + 0x8e0]
mov qword [rsp + 0x28], rax
mov rax, qword [rsp + 0x8c0]
mov qword [rsp + 0x20], rax
mov r9, qword [rsp + 0x8d8]
mov r8, qword [rsp + 0x8d0]
mov rdx, qword [rsp + 0x8c8]
mov ecx, 4
call fcn.0101d5e0
mov dword [rsp + 0x50], 0
jmp 0x101bfb2
mov eax, dword [rsp + 0x50]
add eax, 1
mov dword [rsp + 0x50], eax
mov rax, qword [rsp + 0x8b8]
mov eax, dword [rax + 0xc]
cmp dword [rsp + 0x50], eax
jge 0x101c1d7
mov edx, dword [rsp + 0x50]
mov rcx, qword [rsp + 0x8b8]
call qword [sym.imp.SQLSVC.dll_SHRecMemLock]
mov qword [rsp + 0x60], rax
cmp qword [rsp + 0x60], 0
je 0x101c1d2
mov rax, qword [rsp + 0x60]
mov eax, dword [rax + 0x110]
and eax, 4
test eax, eax
je 0x101c1d2
mov rax, qword [rsp + 0x60]
movzx eax, word [rax + 0x2b4]
test eax, eax
je 0x101c1d2
mov rax, qword [rsp + 0x8c0]
add rax, 4
mov rcx, qword [rsp + 0x60]
add rcx, 4
mov qword [rsp + 0x20], rax
mov r9, rcx
mov r8d, 0xed
xor edx, edx
mov ecx, 3
call fcn.01034b80
mov r8d, 0x837
lea rdx, [0x01002fa8]
mov ecx, reloc.ODBC32.dll_SQLFreeStmt
call fcn.01014ff0
mov qword [rsp + 0x58], rax
cmp qword [rsp + 0x58], 0
je 0x101c1d2
mov rax, qword [rsp + 0x60]
add rax, 0x2b4
mov rcx, rax
call qword [sym.imp.MSVCR80.dll_wcslen]
mov dword [rsp + 0x68], eax
cmp dword [rsp + 0x68], 0
je 0x101c0e5
mov eax, dword [rsp + 0x68]
add eax, 1
cdqe
shl rax, 1
mov r8d, 0x839
lea rdx, [0x01002fa8]
mov ecx, eax
call fcn.01014ff0
mov rcx, qword [rsp + 0x58]
mov qword [rcx], rax
mov rax, qword [rsp + 0x58]
cmp qword [rax], 0
je 0x101c0e5
mov rax, qword [rsp + 0x60]
add rax, 0x2b4
mov ecx, dword [rsp + 0x68]
add ecx, 1
movsxd rcx, ecx
mov r8, rax
mov rdx, rcx
mov rax, qword [rsp + 0x58]
mov rcx, qword [rax]
call fcn.0105ab90
lea rcx, [rsp + 0x80]
call qword [sym.imp.MSVCR80.dll_wcslen]
mov dword [rsp + 0x68], eax
cmp dword [rsp + 0x68], 0
je 0x101c155
mov eax, dword [rsp + 0x68]
add eax, 1
cdqe
shl rax, 1
mov r8d, 0x83f
lea rdx, [0x01002fa8]
mov ecx, eax
call fcn.01014ff0
mov rcx, qword [rsp + 0x58]
mov qword [rcx + 8], rax
mov rax, qword [rsp + 0x58]
cmp qword [rax + 8], 0
je 0x101c155
mov eax, dword [rsp + 0x68]
add eax, 1
cdqe
lea r8, [rsp + 0x80]
mov rdx, rax
mov rax, qword [rsp + 0x58]
mov rcx, qword [rax + 8]
call fcn.0105ab90
mov qword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0
mov r9, qword [rsp + 0x58]
lea r8, [0x010355f0]
xor edx, edx
xor ecx, ecx
call qword [sym.imp.MSVCR80.dll__beginthreadex]
mov qword [rsp + 0x888], rax
cmp qword [rsp + 0x888], 0
je 0x101c1a9
mov rcx, qword [rsp + 0x888]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rsp + 0x888], 0
mov dword [rsp + 0x20], 4
mov r9d, dword [rsp + 0x880]
mov r8d, dword [rsp + 0x6c]
mov rax, qword [rsp + 0x60]
mov edx, dword [rax]
mov rcx, qword [rsp + 0x8b0]
call fcn.010228a0
jmp 0x101bfa7
mov rcx, qword [rsp + 0x890]
xor rcx, rsp
call fcn.01059ab0
add rsp, 0x8a0
pop rdi
ret