Function at 0x100404950
Capabilities:
Check os version

Disassembly:
mov rax, rsp
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rax - 0x148]
sub rsp, 0x220
mov qword [rbp - 0x18], 0xfffffffffffffffe
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
mov qword [rax + 0x18], rdi
mov rax, qword [0x100420010]
xor rax, rsp
mov qword [rbp + 0x110], rax
lea r13, str.sql_ntdbms_storengdmudmpld_sqlwriter.yukon_svcosdependentapi.cpp
mov qword [rsp + 0x40], r13
lea rax, str.YKWSVCC
mov qword [rsp + 0x48], rax
mov dword [rsp + 0x50], 0x81
mov qword [rsp + 0x54], 0x200
xor r12d, r12d
mov dword [rbp - 0x50], 0x1000000
mov qword [rsp + 0x60], r12
mov qword [rsp + 0x68], r12
mov qword [rsp + 0x70], r12
mov qword [rsp + 0x78], r12
mov qword [rbp - 0x80], r12
mov qword [rbp - 0x78], r12
mov qword [rbp - 0x70], r12
mov qword [rbp - 0x68], r12
mov qword [rbp - 0x60], r12
mov qword [rbp - 0x58], r12
lea rax, [rsp + 0x40]
mov qword [rbp - 0x48], rax
mov dword [rbp - 0x40], r12d
lea r13, str.InitSQLWriterOSVerDependentApis
mov qword [rbp - 0x38], r13
mov rax, qword [rsp + 0x48]
mov qword [rbp - 0x30], rax
mov r8d, dword [rsp + 0x50]
mov dword [rbp - 0x28], r8d
mov r14d, dword [rsp + 0x54]
mov dword [rbp - 0x24], r14d
mov r15d, dword [rsp + 0x58]
mov dword [rbp - 0x20], r15d
lea rbx, [0x1004243d0]
lea edi, [r12 + 2]
lea esi, [rdi - 1]
nop dword [rax]
mov rcx, qword [rbx]
cmp dword [rcx + 8], 0
je 0x100404a88
cmp dword [rcx + 0x28], 0
je 0x100404a88
mov rax, qword [rcx]
mov dword [rsp + 0x30], esi
mov qword [rsp + 0x28], r13
mov dword [rsp + 0x20], r14d
mov r9d, r15d
mov rdx, qword [rsp + 0x40]
call qword [rax + 8]
mov rcx, qword [rbx]
mov rax, qword [rcx]
lea rdx, [0x10041465c]
call qword [rax + 0x18]
mov rcx, qword [rbx]
call fcn.1004067a0
mov r8d, dword [rsp + 0x50]
add rbx, 8
sub rdi, rsi
jne 0x100404a40
cmp byte [rbp - 0x4d], dil
lea r13, str.sql_ntdbms_storengdmudmpld_sqlwriter.yukon_svcosdependentapi.cpp
je 0x100404ac3
lea rbx, [rsp + 0x60]
mov edi, 0xa
mov rcx, qword [rbx]
test rcx, rcx
je 0x100404ab9
call qword [sym.imp.ole32.dll_CoTaskMemFree]
mov qword [rbx], r12
add rbx, 8
sub rdi, 1
jne 0x100404aa8
lea rcx, str.advapi32.dll
call qword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov qword [0x100424398], rax
test rax, rax
jne 0x100404b61
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, [rsp + 0x40]
mov qword [rbp - 0x48], rcx
mov qword [rsp + 0x40], r13
lea rcx, str.YKWSVCC
mov qword [rsp + 0x48], rcx
mov dword [rsp + 0x50], 0x8a
mov qword [rsp + 0x54], 0x200
mov dword [rbp - 0x50], 0x1000000
mov qword [rsp + 0x60], r12
mov qword [rsp + 0x68], r12
mov qword [rsp + 0x70], r12
mov qword [rsp + 0x78], r12
mov qword [rbp - 0x80], r12
mov qword [rbp - 0x78], r12
mov qword [rbp - 0x70], r12
mov qword [rbp - 0x68], r12
mov qword [rbp - 0x60], r12
mov qword [rbp - 0x58], r12
mov r9d, eax
lea r8, str.advapi32.dll_cannot_be_loaded.__Error_0x_x.
lea rdx, [rsp + 0x40]
lea rcx, [rbp - 0x40]
call fcn.100401860
jmp 0x100404f54
lea rdx, str.CreateWellKnownSid
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x1004243a8], rax
test rax, rax
jne 0x100404c3f
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, [rsp + 0x40]
mov qword [rbp - 0x48], rcx
mov qword [rsp + 0x40], r13
lea rcx, str.YKWSVCC
mov qword [rsp + 0x48], rcx
mov dword [rsp + 0x50], 0x94
mov qword [rsp + 0x54], 0x200
mov dword [rbp - 0x50], 0x1000000
mov qword [rsp + 0x60], r12
mov qword [rsp + 0x68], r12
mov qword [rsp + 0x70], r12
mov qword [rsp + 0x78], r12
mov qword [rbp - 0x80], r12
mov qword [rbp - 0x78], r12
mov qword [rbp - 0x70], r12
mov qword [rbp - 0x68], r12
mov qword [rbp - 0x60], r12
mov qword [rbp - 0x58], r12
mov r9d, eax
lea r8, str.Proc_address_for_CreateWellknownSid_cannot_be_obtained.__Error_0x_x.
lea rdx, [rsp + 0x40]
lea rcx, [rbp - 0x40]
call fcn.100401860
mov qword [0x1004243a8], r12
mov rcx, qword [0x100424398]
test rcx, rcx
je 0x100404c1d
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
mov qword [0x100424398], r12
mov rcx, qword [0x1004243a0]
test rcx, rcx
je 0x100404f54
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
mov qword [0x1004243a0], r12
jmp 0x100404f54
mov dword [rbp - 0x10], 0x114
lea rcx, [rbp - 0x10]
call qword [sym.imp.KERNEL32.dll_GetVersionExW]
test eax, eax
jne 0x100404cc7
lea rax, [rsp + 0x40]
mov qword [rbp - 0x48], rax
mov qword [rsp + 0x40], r13
lea rcx, str.YKWSVCC
mov qword [rsp + 0x48], rcx
mov dword [rsp + 0x50], 0xa4
mov qword [rsp + 0x54], 0x200
mov dword [rbp - 0x50], 0x1000000
mov qword [rsp + 0x60], r12
mov qword [rsp + 0x68], r12
mov qword [rsp + 0x70], r12
mov qword [rsp + 0x78], r12
mov qword [rbp - 0x80], r12
mov qword [rbp - 0x78], r12
mov qword [rbp - 0x70], r12
mov qword [rbp - 0x68], r12
mov qword [rbp - 0x60], r12
mov qword [rbp - 0x58], r12
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r9d, eax
lea r8, str.Failed_to_retrieve_OS_version_with_error_0x_x.
jmp 0x100404f41
cmp dword [rbp - 0xc], 5
jb 0x100404f4f
jne 0x100404cee
cmp dword [rbp - 8], 1
jb 0x100404f4f
jne 0x100404cee
lea rbx, str.sqlwvss_xp.dll
mov dword [0x100420738], esi
jmp 0x100404cf5
lea rbx, str.sqlwvss.dll
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov qword [0x1004243a0], rax
test rax, rax
jne 0x100404d93
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, [rsp + 0x40]
mov qword [rbp - 0x48], rcx
mov qword [rsp + 0x40], r13
lea rcx, str.YKWSVCC
mov qword [rsp + 0x48], rcx
mov dword [rsp + 0x50], 0xce
mov qword [rsp + 0x54], 0x200
mov dword [rbp - 0x50], 0x1000000
mov qword [rsp + 0x60], r12
mov qword [rsp + 0x68], r12
mov qword [rsp + 0x70], r12
mov qword [rsp + 0x78], r12
mov qword [rbp - 0x80], r12
mov qword [rbp - 0x78], r12
mov qword [rbp - 0x70], r12
mov qword [rbp - 0x68], r12
mov qword [rbp - 0x60], r12
mov qword [rbp - 0x58], r12
mov dword [rsp + 0x20], eax
mov r9, rbx
lea r8, str._ls_cannot_be_loaded.__Error_0x_x.
lea rdx, [rsp + 0x40]
lea rcx, [rbp - 0x40]
call fcn.100401860
jmp 0x100404f4f
lea rdx, str.InitializeGlobalSettings
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x1004243b0], rax
test rax, rax
jne 0x100404e1f
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, [rsp + 0x40]
mov qword [rbp - 0x48], rcx
mov qword [rsp + 0x40], r13
lea rcx, str.YKWSVCC
mov qword [rsp + 0x48], rcx
mov dword [rsp + 0x50], 0xda
mov qword [rsp + 0x54], 0x200
mov dword [rbp - 0x50], 0x1000000
mov qword [rsp + 0x60], r12
mov qword [rsp + 0x68], r12
mov qword [rsp + 0x70], r12
mov qword [rsp + 0x78], r12
mov qword [rbp - 0x80], r12
mov qword [rbp - 0x78], r12
mov qword [rbp - 0x70], r12
mov qword [rbp - 0x68], r12
mov qword [rbp - 0x60], r12
mov qword [rbp - 0x58], r12
lea r8, str.Proc_address_for_InitializeGlobalSettings_cannot_be_obtained.__Error_0x_x.
jmp 0x100404f3e
lea rdx, str.CreateSQLWriter
mov rcx, qword [0x1004243a0]
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x1004243b8], rax
test rax, rax
jne 0x100404eaf
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, [rsp + 0x40]
mov qword [rbp - 0x48], rcx
mov qword [rsp + 0x40], r13
lea rcx, str.YKWSVCC
mov qword [rsp + 0x48], rcx
mov dword [rsp + 0x50], 0xe8
mov qword [rsp + 0x54], 0x200
mov dword [rbp - 0x50], 0x1000000
mov qword [rsp + 0x60], r12
mov qword [rsp + 0x68], r12
mov qword [rsp + 0x70], r12
mov qword [rsp + 0x78], r12
mov qword [rbp - 0x80], r12
mov qword [rbp - 0x78], r12
mov qword [rbp - 0x70], r12
mov qword [rbp - 0x68], r12
mov qword [rbp - 0x60], r12
mov qword [rbp - 0x58], r12
lea r8, str.Proc_address_for_CreateSQLWriter_cannot_be_obtained.__Error_0x_x.
jmp 0x100404f3e
lea rdx, str.DestroySQLWriter
mov rcx, qword [0x1004243a0]
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x1004243c0], rax
test rax, rax
jne 0x100404f57
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, [rsp + 0x40]
mov qword [rbp - 0x48], rcx
mov qword [rsp + 0x40], r13
lea rcx, str.YKWSVCC
mov qword [rsp + 0x48], rcx
mov dword [rsp + 0x50], 0xf6
mov qword [rsp + 0x54], 0x200
mov dword [rbp - 0x50], 0x1000000
mov qword [rsp + 0x60], r12
mov qword [rsp + 0x68], r12
mov qword [rsp + 0x70], r12
mov qword [rsp + 0x78], r12
mov qword [rbp - 0x80], r12
mov qword [rbp - 0x78], r12
mov qword [rbp - 0x70], r12
mov qword [rbp - 0x68], r12
mov qword [rbp - 0x60], r12
mov qword [rbp - 0x58], r12
lea r8, str.Proc_address_for_DestroySQLWriter_cannot_be_obtained.__Error_0x_x.
mov r9d, eax
lea rdx, [rsp + 0x40]
lea rcx, [rbp - 0x40]
call fcn.100401860
call fcn.1004048f0
mov esi, r12d
lea rcx, [rbp - 0x40]
call fcn.1004016e0
mov eax, esi
mov rcx, qword [rbp + 0x110]
xor rcx, rsp
call fcn.10040fdf0
lea r11, [rsp + 0x220]
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x38]
mov rdi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret