Function at 0x1800512c0
Capabilities:
Check os version

Disassembly:
push rdi
sub rsp, 0x60
mov qword [rsp + 0x20], 0xfffffffffffffffe
mov qword [rsp + 0x70], rbx
mov qword [rsp + 0x78], rsi
mov rax, qword [0x1800f30e0]
xor rax, rsp
mov qword [rsp + 0x50], rax
mov sil, 1
mov eax, dword [0x1800ffcf8]
test sil, al
jne 0x180051318
or eax, 1
mov dword [0x1800ffcf8], eax
lea rcx, [0x1800ffcd8]
call fcn.18004fa10
lea rcx, [0x1800ab5b0]
call fcn.180059788
nop
mov eax, dword [0x1800ffd04]
test eax, eax
jne 0x180051353
xor edx, edx
mov r8d, VarUI4FromDisp
lea rcx, [0x1800ffd00]
call fcn.180078610
mov dword [0x1800ffd00], 0x114
lea rcx, [0x1800ffd00]
call qword [sym.imp.KERNEL32.dll_GetVersionExW]
mov eax, dword [0x1800ffd04]
cmp eax, 5
jne 0x180051360
xor sil, sil
jmp 0x180051571
cmp eax, 0xa
je 0x180051571
cmp eax, 6
jne 0x18005137b
cmp dword [0x1800ffd08], 2
jae 0x180051571
lea rcx, [0x1800ffcd8]
cmp qword [0x1800ffcf0], 0x10
cmovae rcx, qword [0x1800ffcd8]
mov r8d, 6
mov rdi, qword [0x1800ffce8]
cmp rdi, r8
cmovb r8, rdi
test r8, r8
je 0x1800513bb
lea rdx, str.unknow
call fcn.18007ac90
test eax, eax
jne 0x1800513c5
cmp rdi, 6
je 0x180051571
cmp rdi, 1
jb 0x180051442
lea rbx, [0x1800ffcd8]
cmp qword [0x1800ffcf0], 0x10
cmovae rbx, qword [0x1800ffcd8]
test rdi, rdi
je 0x180051442
mov r8, rdi
mov edx, 0x2e
mov rcx, rbx
call fcn.18007aa1c
mov r9, rax
test rax, rax
je 0x180051442
movzx eax, byte [rax]
cmp al, byte [0x1800ac8b8]
jne 0x18005140e
xor eax, eax
jmp 0x180051413
sbb eax, eax
or eax, 1
test eax, eax
je 0x180051426
sub rbx, r9
dec rbx
add rdi, rbx
lea rbx, [r9 + 1]
jmp 0x1800513e2
lea rax, [0x1800ffcd8]
cmp qword [0x1800ffcf0], 0x10
cmovae rax, qword [0x1800ffcd8]
sub r9, rax
jmp 0x180051446
or r9, 0xffffffffffffffff
xor r8d, r8d
lea rdx, [rsp + 0x30]
lea rcx, [0x1800ffcd8]
call fcn.18002eeb0
nop
lea rbx, [rsp + 0x30]
cmp qword [rsp + 0x48], 0x10
cmovae rbx, qword [rsp + 0x30]
call fcn.180083b60
mov dword [rax], 0
mov r8d, 0xa
lea rdx, [rsp + 0x28]
mov rcx, rbx
call fcn.180089304
mov edi, eax
cmp rbx, qword [rsp + 0x28]
jne 0x1800514a0
lea rcx, str.invalid_stoi_argument
call fcn.18005a674
int3
call fcn.180083b60
cmp dword [rax], 0x22
je 0x180051564
cmp edi, 8
jg 0x180051514
xor sil, sil
mov rax, qword [rsp + 0x48]
cmp rax, 0x10
jb 0x180051571
inc rax
mov rcx, qword [rsp + 0x30]
cmp rax, 0x1000
jb 0x18005150d
test cl, 0x1f
je 0x1800514e0
call fcn.1800837e4
int3
mov rax, qword [rcx - 8]
cmp rax, rcx
jb 0x1800514ef
call fcn.1800837e4
int3
sub rcx, rax
cmp rcx, 8
jae 0x1800514fe
call fcn.1800837e4
int3
cmp rcx, 0x27
jbe 0x18005150a
call fcn.1800837e4
int3
mov rcx, rax
call fcn.1800591c4
jmp 0x180051571
mov rax, qword [rsp + 0x48]
cmp rax, 0x10
jb 0x180051571
inc rax
mov rcx, qword [rsp + 0x30]
cmp rax, 0x1000
jb 0x18005150d
test cl, 0x1f
je 0x18005153a
call fcn.1800837e4
int3
mov rax, qword [rcx - 8]
cmp rax, rcx
jb 0x180051549
call fcn.1800837e4
int3
sub rcx, rax
cmp rcx, 8
jae 0x180051558
call fcn.1800837e4
int3
cmp rcx, 0x27
jbe 0x18005150a
call fcn.1800837e4
nop
lea rcx, str.stoi_argument_out_of_range
call fcn.18005a6bc
nop
movzx eax, sil
mov rcx, qword [rsp + 0x50]
xor rcx, rsp
call fcn.180059260
mov rbx, qword [rsp + 0x70]
mov rsi, qword [rsp + 0x78]
add rsp, 0x60
pop rdi
ret