Function at 0x140050254
Capabilities:
Check os version
Link many functions at runtime

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
mov qword [rax + 0x18], rdi
push rbp
lea rbp, [rax - 0x78]
sub rsp, 0x170
mov rax, qword [0x140090008]
xor rax, rsp
mov qword [rbp + 0x68], rax
mov dword [rsp + 0x40], VarUI4FromDisp
lea rcx, [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_GetVersionExW]
cmp dword [rsp + 0x44], 6
jne 0x1400502a3
cmp dword [rsp + 0x48], 1
jae 0x1400502a9
cmp dword [rsp + 0x44], 6
jbe 0x140050672
lea rcx, str.kernelbase.dll
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov rbx, rax
xor edi, edi
test rax, rax
sete dil
test rax, rax
jne 0x1400502dd
call fcn.140059b54
mov eax, edi
or eax, 0x80070000
test edi, edi
cmove eax, edi
jmp 0x140050a2d
lea rdx, [0x1400751b0]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
test rax, rax
jne 0x140050310
lea rcx, str.kernel32.dll
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov rbx, rax
xor edi, edi
test rax, rax
sete dil
test rax, rax
je 0x1400502c7
lea rdx, [0x1400751b0]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
xor edi, edi
test rax, rax
sete dil
test rax, rax
je 0x1400502c7
mov qword [0x1400922b8], rax
lea rdx, [0x140075200]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
xor edi, edi
test rax, rax
sete dil
test rax, rax
je 0x1400502c7
mov qword [0x140092310], rax
lea rdx, [0x140075220]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
xor edi, edi
test rax, rax
sete dil
test rax, rax
je 0x1400502c7
mov qword [0x140092318], rax
lea rdx, [0x140075210]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
xor edi, edi
test rax, rax
sete dil
test rax, rax
je 0x1400502c7
mov qword [0x140092320], rax
lea rdx, [0x140075230]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
xor edi, edi
test rax, rax
sete dil
test rax, rax
je 0x1400502c7
mov qword [0x140092328], rax
lea rdx, [0x140075258]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
xor edi, edi
test rax, rax
sete dil
test rax, rax
je 0x1400502c7
mov qword [0x140092330], rax
lea rdx, [0x140075240]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
xor edi, edi
test rax, rax
sete dil
test rax, rax
je 0x1400502c7
mov qword [0x140092338], rax
lea rdx, [0x140075270]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
xor edi, edi
test rax, rax
sete dil
test rax, rax
je 0x1400502c7
mov qword [0x140092350], rax
lea rdx, [0x140070528]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
xor edi, edi
test rax, rax
sete dil
test rax, rax
je 0x1400502c7
mov qword [0x140092358], rax
lea rdx, [0x140075348]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x140092370]
test rax, rax
cmovne rcx, rax
mov qword [0x140092370], rcx
lea rdx, [0x140075330]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x140092378]
test rax, rax
cmovne rcx, rax
mov qword [0x140092378], rcx
lea rdx, [0x140075290]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
xor edi, edi
test rax, rax
sete dil
test rax, rax
je 0x1400502c7
mov qword [0x140092380], rax
lea rdx, [0x140075280]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
xor edi, edi
test rax, rax
sete dil
test rax, rax
je 0x1400502c7
mov qword [0x140092388], rax
lea rdx, [0x1400752b0]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
xor edi, edi
test rax, rax
sete dil
test rax, rax
je 0x1400502c7
mov qword [0x140092360], rax
lea rdx, [0x1400752a0]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
xor edi, edi
test rax, rax
sete dil
test rax, rax
je 0x1400502c7
mov qword [0x140092368], rax
lea rdx, [0x1400752d0]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
xor edi, edi
test rax, rax
sete dil
test rax, rax
je 0x1400502c7
mov qword [0x140092390], rax
lea rdx, [0x1400752c0]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
xor edi, edi
test rax, rax
sete dil
test rax, rax
je 0x1400502c7
mov qword [0x140092398], rax
lea rdx, [0x1400752f0]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
xor edi, edi
test rax, rax
sete dil
test rax, rax
je 0x1400502c7
mov qword [0x1400923a0], rax
lea rdx, [0x1400752e0]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
xor edi, edi
test rax, rax
sete dil
test rax, rax
je 0x1400502c7
mov qword [0x1400923a8], rax
lea rdx, [0x140075318]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
xor edi, edi
test rax, rax
sete dil
test rax, rax
je 0x1400502c7
mov qword [0x1400923b0], rax
lea rdx, [0x140075300]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
xor ebx, ebx
test rax, rax
sete bl
test rax, rax
jne 0x14005066b
call fcn.140059b54
mov eax, ebx
or eax, 0x80070000
test ebx, ebx
cmove eax, ebx
jmp 0x140050a2d
mov qword [0x1400923b8], rax
call fcn.140059c50
mov ecx, eax
test eax, eax
je 0x14005068f
movzx eax, cx
or eax, 0x80070000
test ecx, ecx
cmovle eax, ecx
jmp 0x140050a2d
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapLock]
nop
xorps xmm0, xmm0
movdqu xmmword [rsp + 0x20], xmm0
and qword [rsp + 0x30], 0
lea rcx, [rsp + 0x20]
call fcn.1400500f4
mov edi, eax
test eax, eax
je 0x1400506d6
call fcn.140059b54
movzx ebx, di
or ebx, 0x80070000
test edi, edi
cmovle ebx, edi
jmp 0x1400509be
lea rdx, [0x14004e9a0]
lea rcx, [0x1400922b8]
call fcn.140059674
test eax, eax
jne 0x140050961
lea rdx, [0x14004eb90]
lea rcx, [0x140092310]
call fcn.140059674
test eax, eax
jne 0x140050961
lea rdx, [0x14004ed80]
lea rcx, [0x140092318]
call fcn.140059674
test eax, eax
jne 0x140050961
lea rdx, [fcn.14004ee68]
lea rcx, [0x140092320]
call fcn.140059674
test eax, eax
jne 0x140050961
lea rdx, [0x14004f124]
lea rcx, [0x140092328]
call fcn.140059674
test eax, eax
jne 0x140050961
lea rdx, [0x14004f1f4]
lea rcx, [0x140092330]
call fcn.140059674
test eax, eax
jne 0x140050961
lea rdx, [0x14004f290]
lea rcx, [0x140092338]
call fcn.140059674
test eax, eax
jne 0x140050961
lea rdx, [0x14004f32c]
lea rcx, [0x140092340]
call fcn.140059674
test eax, eax
jne 0x140050961
lea rdx, [fcn.14004f3f0]
lea rcx, [0x140092348]
call fcn.140059674
test eax, eax
jne 0x140050961
lea rdx, [0x14004f4d0]
lea rcx, [0x140092350]
call fcn.140059674
test eax, eax
jne 0x140050961
lea rdx, [fcn.14004f5b0]
lea rcx, [0x140092358]
call fcn.140059674
test eax, eax
jne 0x140050961
lea rdx, [0x14004f694]
lea rcx, [0x140092370]
call fcn.140059674
test eax, eax
jne 0x140050961
lea rdx, [fcn.14004f7f0]
lea rcx, [0x140092378]
call fcn.140059674
test eax, eax
jne 0x140050961
lea rdx, [0x14004f8d0]
lea rcx, [0x140092380]
call fcn.140059674
test eax, eax
jne 0x140050961
lea rdx, [fcn.14004f994]
lea rcx, [0x140092388]
call fcn.140059674
test eax, eax
jne 0x140050961
lea rdx, [0x14004fa74]
lea rcx, [0x140092360]
call fcn.140059674
test eax, eax
jne 0x140050961
lea rdx, [0x14004facc]
lea rcx, [0x140092368]
call fcn.140059674
test eax, eax
jne 0x140050961
lea rdx, [0x14004fb24]
lea rcx, [0x140092390]
call fcn.140059674
test eax, eax
jne 0x140050961
lea rdx, [0x14004fbfc]
lea rcx, [0x140092398]
call fcn.140059674
test eax, eax
jne 0x140050961
lea rdx, [0x14004fcd4]
lea rcx, [0x1400923a0]
call fcn.140059674
test eax, eax
jne 0x140050961
lea rdx, [0x14004fdac]
lea rcx, [0x1400923a8]
call fcn.140059674
test eax, eax
jne 0x140050961
lea rdx, [0x14004fe84]
lea rcx, [0x1400923b0]
call fcn.140059674
test eax, eax
jne 0x140050961
lea rdx, [0x14004ffbc]
lea rcx, [0x1400923b8]
call fcn.140059674
test eax, eax
jne 0x140050961
lea rdx, [0x14004f1f4]
lea rcx, [0x140092330]
call fcn.140059674
test eax, eax
jne 0x140050961
lea rdx, [0x14004f290]
lea rcx, [0x140092338]
call fcn.140059674
test eax, eax
je 0x140050976
movzx ebx, ax
or ebx, 0x80070000
test eax, eax
cmovle ebx, eax
call fcn.140059b54
jmp 0x14005099d
call fcn.140059ce0
test eax, eax
je 0x14005098f
and qword [rsp + 0x38], 0
lea rcx, [rsp + 0x38]
call fcn.140059ce8
movzx ebx, ax
or ebx, 0x80070000
test eax, eax
cmovle ebx, eax
mov rsi, qword [rsp + 0x28]
mov rdi, qword [rsp + 0x20]
cmp rdi, rsi
je 0x1400509c3
mov rcx, qword [rdi]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
add rdi, 8
cmp rdi, rsi
jne 0x1400509ac
mov rdi, qword [rsp + 0x20]
test rdi, rdi
je 0x140050a1b
mov rax, qword [rsp + 0x30]
sub rax, rdi
sar rax, 3
lea rdx, [rax*8]
mov rax, rdi
cmp rdx, 0x1000
jb 0x140050a04
add rdx, 0x27
mov rdi, qword [rdi - 8]
sub rax, rdi
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140050a04
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
mov rcx, rdi
call fcn.140052590
xorps xmm0, xmm0
movdqu xmmword [rsp + 0x20], xmm0
and qword [rsp + 0x30], 0
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapUnlock]
nop
mov eax, ebx
mov rcx, qword [rbp + 0x68]
xor rcx, rsp
call fcn.140052570
lea r11, [rsp + 0x170]
mov rbx, qword [r11 + 0x10]
mov rsi, qword [r11 + 0x18]
mov rdi, qword [r11 + 0x20]
mov rsp, r11
pop rbp
ret