Function at 0x407820
Capabilities:
Check os version
Get system information on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x260
mov eax, dword [0x553948]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, ecx
xor ebx, ebx
mov dword [ebp - 0x260], ebx
push edi
mov dword [esi], ebx
mov dword [esi + 0x18], 3
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push 0x5119d8
mov edi, eax
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
cmp eax, ebx
je 0x407870
push str.IsWow64Process
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp eax, ebx
jne 0x407874
xor eax, eax
jmp 0x40789a
lea ecx, [ebp - 0x238]
push ecx
push edi
mov dword [ebp - 0x238], ebx
call eax
test eax, eax
jne 0x40788f
mov eax, 2
jmp 0x40789a
xor eax, eax
cmp dword [ebp - 0x238], ebx
setne al
push 0x118
lea edx, [ebp - 0x11c]
push ebx
push edx
mov dword [esi + 0x24], eax
mov dword [ebp - 0x120], 0x11c
call fcn.004e41d0
add esp, 0xc
lea eax, [ebp - 0x120]
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
mov eax, dword [ebp - 0x11c]
mov ecx, dword [ebp - 0x118]
mov edx, dword [ebp - 0x114]
mov dword [esi + 4], eax
mov dword [esi + 8], ecx
mov dword [esi + 0xc], edx
cmp eax, 5
jne 0x4078fa
cmp ecx, ebx
jle 0x407947
xor edx, edx
cmp ecx, 1
setne dl
inc edx
mov dword [esi], edx
jmp 0x407947
cmp eax, 6
jne 0x407925
sub ecx, ebx
je 0x40791d
dec ecx
je 0x407915
dec ecx
je 0x40790d
mov dword [esi], eax
jmp 0x407947
mov dword [esi], 5
jmp 0x407947
mov dword [esi], 4
jmp 0x407947
mov dword [esi], 3
jmp 0x407947
cmp eax, 0xa
jne 0x40793c
xor eax, eax
cmp edx, 0x295a
setge al
add eax, 7
mov dword [esi], eax
jmp 0x407947
cmp eax, 6
jle 0x407947
mov dword [esi], 9
movzx ecx, word [ebp - 0xc]
movzx edx, word [ebp - 0xa]
mov eax, dword [esi]
mov dword [esi + 0x10], ecx
mov dword [esi + 0x14], edx
cmp eax, 5
je 0x407961
cmp eax, 6
jne 0x4079d8
push str.RtlGetVersion
push 0x513044
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov edi, eax
cmp edi, ebx
je 0x4079d8
push 0x114
lea eax, [ebp - 0x234]
push ebx
push eax
call fcn.004e41d0
add esp, 0xc
lea ecx, [ebp - 0x234]
push ecx
mov dword [ebp - 0x234], 0x114
call edi
test eax, eax
js 0x4079d8
mov eax, dword [ebp - 0x230]
cmp eax, 6
jne 0x4079c2
cmp dword [ebp - 0x22c], 3
jb 0x4079d8
mov dword [esi], eax
jmp 0x4079d8
cmp eax, 0xa
jne 0x4079d8
cmp dword [ebp - 0x228], 0x295a
sbb edx, edx
add edx, 8
mov dword [esi], edx
xor eax, eax
mov dword [ebp - 0x258], eax
mov dword [ebp - 0x254], eax
mov dword [ebp - 0x250], eax
mov dword [ebp - 0x24c], eax
mov dword [ebp - 0x248], eax
mov dword [ebp - 0x244], eax
mov dword [ebp - 0x240], eax
mov dword [ebp - 0x23c], eax
lea eax, [ebp - 0x25c]
push eax
mov dword [ebp - 0x25c], ebx
call dword [sym.imp.KERNEL32.dll_GetNativeSystemInfo]
movzx eax, word [ebp - 0x25c]
cmp eax, ebx
je 0x407a44
cmp eax, 6
je 0x407a3b
cmp eax, 9
jne 0x407a47
mov dword [esi + 0x18], 1
jmp 0x407a47
mov dword [esi + 0x18], 2
jmp 0x407a47
mov dword [esi + 0x18], ebx
mov ecx, dword [ebp - 0x248]
mov edx, dword [ebp - 0x240]
mov dword [esi + 0x1c], ecx
mov ecx, dword [ebp - 4]
pop edi
mov dword [esi + 0x20], edx
mov eax, esi
pop esi
xor ecx, ebp
pop ebx
call fcn.00401316
mov esp, ebp
pop ebp
ret