Function at 0x40511f
Capabilities:
Check os version

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x630
mov eax, dword [0x46a008]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
mov esi, dword [ebp + 0x10]
xor ebx, ebx
push edi
mov edi, dword [ebp + 0xc]
mov dword [ebp - 0x12c], eax
mov eax, dword [ebp + 0x18]
push 0x11c
mov dword [ebp - 0x148], eax
lea eax, [ebp - 0x120]
push ebx
push eax
mov dword [ebp - 0x134], esi
mov dword [ebp - 0x144], ebx
mov dword [ebp - 0x140], ebx
mov dword [ebp - 0x13c], ebx
mov dword [ebp - 0x138], ebx
call fcn.0042f8b0
push 0x4e8
lea eax, [ebp - 0x630]
mov dword [ebp - 0x124], ebx
push ebx
push eax
mov dword [ebp - 0x130], ebx
call fcn.0042f8b0
add esp, 0x18
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call fcn.004406df
push ebx
push 3
call fcn.00440895
lea eax, [ebp - 0x150]
push eax
lea eax, [ebp - 0x154]
push eax
push esi
call fcn.0040120a
mov esi, eax
test esi, esi
jns 0x4051e3
push str.Failed_to_parse_command_line.
push esi
call fcn.0044041e
pop ecx
pop ecx
mov edi, ebx
jmp 0x40545e
push edi
lea eax, [ebp - 0x630]
push eax
call fcn.00404263
mov esi, eax
test esi, esi
jns 0x4051fd
push str.Failed_to_initialize_engine_state.
jmp 0x4051d4
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x604], eax
call fcn.004055a2
push 0
push 0
call dword [sym.imp.ole32.dll_CoInitializeEx]
mov esi, eax
test esi, esi
jns 0x405222
push str.Failed_to_initialize_COM.
jmp 0x4051d4
xor edi, edi
inc edi
call fcn.0043fe97
mov esi, eax
test esi, esi
jns 0x405242
push str.Failed_to_initialize_Cryputil.
push esi
call fcn.0044041e
pop ecx
pop ecx
jmp 0x40545e
mov dword [ebp - 0x144], edi
call fcn.00440fee
mov esi, eax
test esi, esi
jns 0x40525a
push str.Failed_to_initialize_Regutil.
jmp 0x405235
mov dword [ebp - 0x140], edi
call fcn.00442cc7
mov esi, eax
test esi, esi
jns 0x405272
push str.Failed_to_initialize_Wiutil.
jmp 0x405235
mov dword [ebp - 0x13c], edi
call fcn.00443735
mov esi, eax
test esi, esi
jns 0x40528a
push str.Failed_to_initialize_XML_util.
jmp 0x405235
lea eax, [ebp - 0x120]
mov dword [ebp - 0x138], edi
push eax
mov dword [ebp - 0x120], 0x11c
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
test eax, eax
jne 0x4052e3
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x4052c2
movzx esi, si
or esi, 0x80070000
test esi, esi
js 0x4052c9
mov esi, 0x80004005
push esi
push 0x95
push str.engine.cpp
call fcn.00403858
push str.Failed_to_get_OS_info.
jmp 0x405235
push 0
lea eax, [ebp - 0x124]
push eax
call fcn.0040345a
push dword [ebp - 0x124]
movzx eax, word [ebp - 0xc]
push eax
push dword [ebp - 0x114]
push dword [ebp - 0x118]
push dword [ebp - 0x11c]
push str.3.11.0.1701
push 0x20000001
push 2
call fcn.0040558c
add esp, 0x20
cmp dword [ebp - 0x124], ebx
je 0x40533b
push dword [ebp - 0x124]
call fcn.004026e8
and dword [ebp - 0x124], ebx
lea eax, [ebp - 0x630]
push eax
call fcn.004174ca
mov esi, eax
test esi, esi
jns 0x405357
push str.Failed_to_initialize_core.
jmp 0x405235
mov eax, dword [ebp - 0x1a0]
sub eax, 0
je 0x405428
sub eax, 1
je 0x405400
sub eax, 1
je 0x4053d8
sub eax, 1
je 0x4053b0
sub eax, 1
je 0x40538d
mov esi, 0x8000ffff
push str.Invalid_run_mode.
jmp 0x405235
push dword [ebp + 0x14]
lea eax, [ebp - 0x530]
push eax
call fcn.00404c12
mov esi, eax
test esi, esi
jns 0x40544a
push str.Failed_to_run_RunOnce_mode.
jmp 0x405235
lea eax, [ebp - 0x630]
mov dword [ebp - 0x130], edi
push eax
push dword [ebp - 0x12c]
call fcn.00404a14
mov esi, eax
test esi, esi
jns 0x40544a
push str.Failed_to_run_embedded_mode.
jmp 0x405235
lea eax, [ebp - 0x630]
push eax
push dword [ebp - 0x134]
push dword [ebp - 0x12c]
call fcn.0040487b
mov esi, eax
test esi, esi
jns 0x40544a
push str.Failed_to_run_per_machine_mode.
jmp 0x405235
lea eax, [ebp - 0x630]
mov dword [ebp - 0x130], edi
push eax
push dword [ebp - 0x12c]
call fcn.00404a71
mov esi, eax
test esi, esi
jns 0x40544a
push str.Failed_to_run_per_user_mode.
jmp 0x405235
lea eax, [ebp - 0x630]
push eax
push dword [ebp - 0x134]
call fcn.00404cc5
mov esi, eax
test esi, esi
jns 0x40544a
push str.Failed_to_run_untrusted_mode.
jmp 0x405235
mov ecx, dword [ebp - 0x148]
mov eax, dword [ebp - 0x538]
mov ebx, dword [ebp - 0x618]
mov dword [ecx], eax
cmp dword [ebp - 0x124], 0
je 0x405472
push dword [ebp - 0x124]
call fcn.004026e8
test esi, esi
jns 0x405484
cmp dword [ebp - 0x23c], 0
jne 0x405484
call fcn.0041418c
lea eax, [ebp - 0x578]
push eax
call fcn.0040d7cb
push dword [ebp - 0x520]
call fcn.0041a7c4
call fcn.0041aa12
test ebx, ebx
je 0x4054d0
mov eax, dword [ebp - 0x5f8]
test eax, eax
je 0x4054d0
cmp eax, 6
je 0x4054d0
push eax
call fcn.004142ec
push eax
push 0xa0000008
push 2
call fcn.0040558c
add esp, 0xc
mov esi, 0x80070bc2
xor ebx, ebx
lea eax, [ebp - 0x630]
push eax
call fcn.00404f2e
cmp dword [ebp - 0x138], 0
je 0x4054ea
call fcn.00443c05
cmp dword [ebp - 0x13c], 0
je 0x4054f8
call fcn.004430ce
cmp dword [ebp - 0x140], 0
je 0x405506
call fcn.00441660
cmp dword [ebp - 0x144], 0
je 0x405514
call fcn.0043ffa6
test edi, edi
je 0x40551e
call dword [sym.imp.ole32.dll_CoUninitialize]
cmp dword [ebp - 0x130], 0
je 0x405560
test esi, esi
jns 0x40552f
mov edi, esi
jmp 0x405537
mov eax, dword [ebp - 0x148]
mov edi, dword [eax]
push ebx
call fcn.00413d25
push eax
push edi
push 0x20000007
push 2
call fcn.0040558c
add esp, 0x10
test ebx, ebx
je 0x405560
push 0xa0000005
push 2
call fcn.0040558c
pop ecx
pop ecx
push 0
call fcn.004402fa
test ebx, ebx
je 0x405570
call fcn.0040457a
push 0
call fcn.004409e9
mov ecx, dword [ebp - 4]
mov eax, esi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0042dfc6
mov esp, ebp
pop ebp
ret 0x14