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

Disassembly:
push ebp
lea ebp, [esp - 0x78]
sub esp, 0xc8
lea eax, [ebp - 0x50]
push eax
mov dword [ebp - 0x50], 0x9c
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
mov eax, dword [ebp - 0x4c]
mov dword [esi], eax
mov eax, dword [ebp - 0x48]
mov dword [esi + 4], eax
mov eax, dword [ebp - 0x44]
mov dword [esi + 8], eax
lea eax, [ebp - 0x3c]
push eax
call fcn.0043f830
test eax, eax
pop ecx
jg 0x40ba12
mov byte [esi + 0xc], 0
cmp dword [ebp - 0x40], 2
mov byte [esi + 0x10c], 0
mov byte [esi + 0x10d], 0
mov byte [esi + 0x10e], 0
mov byte [esi + 0x10f], 0
mov byte [esi + 0x114], 0
mov byte [esi + 0x115], 0
mov byte [esi + 0x110], 0
mov byte [esi + 0x111], 0
mov byte [esi + 0x116], 0
mov byte [esi + 0x117], 0
mov byte [esi + 0x11a], 0
mov byte [esi + 0x11b], 0
mov byte [esi + 0x11c], 0
mov byte [esi + 0x11d], 0
mov byte [esi + 0x11e], 0
mov byte [esi + 0x11f], 0
jne 0x40bae8
mov eax, dword [esi]
sub eax, 4
mov byte [esi + 0x10c], 1
je 0x40bad8
dec eax
je 0x40ba6a
dec eax
jne 0x40bb3c
mov eax, dword [esi + 4]
test eax, eax
mov byte [esi + 0x10f], 1
jne 0x40ba3e
mov byte [esi + 0x115], 1
mov byte [esi + 0x111], 1
mov byte [esi + 0x119], 1
mov byte [esi + 0x118], 1
jmp 0x40bb3c
lea ecx, [ebp + eax - 0x3c]
cmp byte [ecx], 0x20
jne 0x40ba17
mov byte [ecx], 0
dec eax
test eax, eax
jg 0x40ba06
xor ecx, ecx
test eax, eax
jle 0x40ba29
cmp byte [ebp + ecx - 0x3c], 0x20
jne 0x40ba29
inc ecx
cmp ecx, eax
jl 0x40ba1d
lea eax, [ebp + ecx - 0x3c]
push eax
lea eax, [esi + 0xc]
push eax
call fcn.0043f3b0
pop ecx
pop ecx
jmp 0x40b93d
cmp eax, 1
jne 0x40bb3c
mov byte [esi + 0x111], al
mov byte [esi + 0x117], al
mov byte [esi + 0x115], al
mov byte [esi + 0x113], al
mov byte [esi + 0x112], al
jmp 0x40bb3c
mov eax, dword [esi + 4]
test eax, eax
mov byte [esi + 0x10f], 1
jne 0x40ba8b
mov byte [esi + 0x115], 1
mov byte [esi + 0x114], 1
jmp 0x40bb3c
cmp eax, 1
je 0x40bac1
cmp eax, 2
jne 0x40ba9d
cmp byte [ebp + 0x4a], 1
je 0x40bac1
cmp eax, eax
jb 0x40bb3c
mov byte [esi + 0x115], 1
mov byte [esi + 0x111], 1
mov byte [esi + 0x117], 1
mov byte [esi + 0x116], 1
jmp 0x40bb3c
mov byte [esi + 0x115], 1
mov byte [esi + 0x111], 1
mov byte [esi + 0x110], 1
jmp 0x40bb3c
mov byte [esi + 0x10f], 1
mov byte [esi + 0x10e], 1
jmp 0x40bb3c
movzx eax, word [ebp - 0x44]
mov dword [esi + 8], eax
mov eax, dword [esi + 4]
test eax, eax
mov byte [esi + 0x10d], 1
mov byte [esi + 0x11d], 1
je 0x40bb35
cmp eax, 0xa
je 0x40bb25
cmp eax, 0x5a
jne 0x40bb3c
mov byte [esi + 0x11b], 1
mov byte [esi + 0x11f], 1
mov byte [esi + 0x11e], 1
jmp 0x40bb3c
mov byte [esi + 0x11b], 1
mov byte [esi + 0x11a], 1
jmp 0x40bb3c
mov byte [esi + 0x11c], 1
and dword [ebp + 0x74], 0
push ebx
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push str.IsWow64Process
push str.kernel32
call edi
mov ebx, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
test eax, eax
mov dword [ebp + 0x70], eax
je 0x40bb79
lea eax, [ebp + 0x74]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [ebp + 0x70]
test eax, eax
jne 0x40bb79
and dword [ebp + 0x74], eax
cmp dword [ebp + 0x74], 1
lea eax, [esi + 0x120]
mov byte [eax], 0
jne 0x40bb8b
mov byte [eax], 1
cmp byte [eax], 0
je 0x40bbab
push str.GetNativeSystemInfo
push str.kernel32
call edi
push eax
call ebx
test eax, eax
je 0x40bbb5
lea ecx, [ebp + 0x4c]
push ecx
call eax
jmp 0x40bbb5
lea eax, [ebp + 0x4c]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov ax, word [ebp + 0x4c]
test ax, ax
pop edi
pop ebx
jne 0x40bbcc
mov dword [esi + 0x124], 1
jmp 0x40bbfb
cmp ax, 6
jne 0x40bbde
mov dword [esi + 0x124], 2
jmp 0x40bbfb
cmp ax, 9
jne 0x40bbf0
mov dword [esi + 0x124], 3
jmp 0x40bbfb
movzx eax, ax
neg eax
mov dword [esi + 0x124], eax
mov eax, esi
add ebp, 0x78
leave
ret