Function at 0x403640
Capabilities:
Check os version

Disassembly:
mov r11, rsp
sub rsp, 0x538
mov rax, qword [0x00408550]
mov qword [rsp + 0x4e0], rax
mov qword [r11 - 0x10], rbp
mov qword [r11 - 0x18], rsi
mov qword [r11 - 0x20], rdi
mov qword [r11 - 0x28], r12
mov qword [r11 - 0x30], r13
mov qword [r11 - 0x38], r14
mov qword [r11 - 0x40], r15
xor r14d, r14d
mov esi, 1
mov edi, r8d
mov dword [rsp + 0x20], r8d
mov r13, rdx
mov r15d, r14d
mov r12d, ecx
mov ebp, esi
mov dword [0x00408588], ecx
mov qword [0x00408578], r9
call qword [sym.imp.KERNEL32.dll_GetVersion]
mov ecx, dword [0x004085a8]
shr eax, 0x10
mov qword [0x00408580], r14
and ax, 0xc000
cmp ax, 0xc000
cmove ecx, esi
mov dword [0x004085a8], ecx
mov ecx, r12d
call qword [sym.imp.KERNEL32.dll_DebugActiveProcess]
test eax, eax
jne 0x40373f
mov ecx, r12d
call fcn.004034a0
test eax, eax
jne 0x4036ea
mov ecx, r12d
call qword [sym.imp.KERNEL32.dll_DebugActiveProcess]
test eax, eax
jne 0x40373f
lea rdx, [rsp + 0x2e0]
mov r8d, 0x200
mov ecx, 0xd1
call fcn.00401550
lea rdx, [rsp + 0xe0]
mov r8d, 0x200
mov ecx, 0xd2
call fcn.00401550
lea r8, [rsp + 0xe0]
lea rdx, [rsp + 0x2e0]
mov r9d, 0x10030
xor ecx, ecx
call qword [sym.imp.USER32.dll_MessageBoxA]
xor eax, eax
jmp 0x4039f7
cmp dword [0x004085a8], r14d
je 0x403751
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_SetEvent]
mov qword [rsp + 0x530], rbx
lea rbx, [0x00400000]
lea rcx, [rsp + 0x30]
mov edx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_WaitForDebugEvent]
test ebp, ebp
je 0x403794
dec ebp
cmp dword [rsp + 0x30], 3
je 0x403794
mov r8d, r12d
xor edx, edx
mov ecx, 0x1f0fff
call qword [sym.imp.KERNEL32.dll_OpenProcess]
mov qword [0x00408570], rax
mov eax, dword [rsp + 0x30]
dec eax
cmp eax, 5
ja case.default.0x4037ad
mov ecx, dword [rbx + rax*4 + 0x3a44]
add rcx, rbx
jmp rcx
mov rax, qword [rsp + 0x48]
mov rdx, qword [rsp + 0x58]
mov rcx, qword [rsp + 0x40]
mov qword [0x00408570], rax
call fcn.00402ad0
mov rbx, qword [0x00408590]
test rbx, rbx
mov rdi, qword [rsp + 0x50]
mov esi, dword [rsp + 0x38]
mov rcx, rbx
je 0x4037f7
mov eax, dword [rsp + 0x38]
cmp dword [rcx + 0x10], eax
je 0x40399e
mov rcx, qword [rcx]
test rcx, rcx
jne 0x4037e2
mov ecx, 0x18
call qword [sym.imp.msvcrt.dll_malloc]
inc dword [0x004085a0]
mov qword [rax], rbx
mov qword [rax + 8], rdi
mov edi, dword [rsp + 0x20]
mov dword [rax + 0x10], esi
lea rbx, [0x00400000]
mov qword [0x00408590], rax
mov esi, 1
jmp case.default.0x4037ad
cmp dword [rsp + 0xd8], 0
mov rax, qword [rsp + 0x40]
je 0x403867
cmp eax, 0x80000003
jne 0x403867
test r14d, r14d
jne 0x403867
cmp dword [0x004085a8], 0
mov r14d, esi
jne case.default.0x4037ad
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_SetEvent]
jmp case.default.0x4037ad
test r15d, r15d
mov ebx, 0x80010001
jne 0x40389e
test edi, edi
mov r15d, esi
jne 0x403888
mov ecx, dword [rsp + 0x38]
mov r8d, eax
mov edx, esi
call fcn.00402f70
jmp 0x40389e
mov ecx, dword [rsp + 0x38]
mov r8d, edi
mov edx, 2
call fcn.00402f70
mov ebx, 0x10002
mov edx, dword [rsp + 0x38]
mov ecx, dword [rsp + 0x34]
mov r8d, ebx
call qword [sym.imp.KERNEL32.dll_ContinueDebugEvent]
lea rbx, [0x00400000]
jmp 0x403760
mov rdx, qword [rsp + 0x48]
mov rcx, qword [rsp + 0x40]
call fcn.00402ad0
jmp case.default.0x4037ad
mov rbx, qword [0x00408590]
mov rdi, qword [rsp + 0x40]
mov esi, dword [rsp + 0x38]
test rbx, rbx
mov rcx, rbx
je 0x403905
nop
nop
nop
mov eax, dword [rsp + 0x38]
cmp dword [rcx + 0x10], eax
je 0x40398c
mov rcx, qword [rcx]
test rcx, rcx
jne 0x4038f0
mov ecx, 0x18
call qword [sym.imp.msvcrt.dll_malloc]
inc dword [0x004085a0]
mov qword [rax], rbx
mov qword [rax + 8], rdi
mov edi, dword [rsp + 0x20]
mov dword [rax + 0x10], esi
lea rbx, [0x00400000]
mov qword [0x00408590], rax
mov esi, 1
jmp case.default.0x4037ad
mov rcx, qword [0x00408590]
mov eax, dword [rsp + 0x38]
cmp dword [rcx + 0x10], eax
je 0x403974
nop
nop
mov rdx, rcx
mov rcx, qword [rcx]
cmp dword [rcx + 0x10], eax
jne 0x403950
test rdx, rdx
je 0x403974
mov rax, qword [rcx]
mov qword [rdx], rax
call qword [sym.imp.msvcrt.dll_free]
dec dword [0x004085a0]
jmp case.default.0x4037ad
mov rax, qword [rcx]
mov qword [0x00408590], rax
call qword [sym.imp.msvcrt.dll_free]
dec dword [0x004085a0]
jmp case.default.0x4037ad
mov edi, dword [rsp + 0x20]
lea rbx, [0x00400000]
mov esi, 1
jmp case.default.0x4037ad
mov edi, dword [rsp + 0x20]
lea rbx, [0x00400000]
mov esi, 1
mov edx, dword [rsp + 0x38]
mov ecx, dword [rsp + 0x34]
mov r8d, 0x10002
call qword [sym.imp.KERNEL32.dll_ContinueDebugEvent]
jmp 0x403760
mov edx, dword [rsp + 0x38]
mov ecx, dword [rsp + 0x34]
mov r8d, 0x10002
call qword [sym.imp.KERNEL32.dll_ContinueDebugEvent]
mov rcx, qword [0x00408570]
mov edx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov rbx, qword [rsp + 0x530]
mov eax, esi
mov r15, qword [rsp + 0x4f8]
mov r14, qword [rsp + 0x500]
mov r13, qword [rsp + 0x508]
mov r12, qword [rsp + 0x510]
mov rdi, qword [rsp + 0x518]
mov rsi, qword [rsp + 0x520]
mov rbp, qword [rsp + 0x528]
mov rcx, qword [rsp + 0x4e0]
call fcn.00405710
add rsp, 0x538
ret