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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x180
mov eax, dword [0x4ea5e0]
xor eax, ebp
mov dword [ebp - 4], eax
push edi
push 0x138
xor edi, edi
push edi
push ebx
call fcn.004b2d10
add esp, 0xc
push str.KERNEL32.DLL
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov dword [ebp - 0x138], eax
cmp eax, edi
jne 0x4056db
xor eax, eax
pop edi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a8a2f
mov esp, ebp
pop ebp
ret
push esi
push 0x4d4db4
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, eax
cmp esi, edi
je 0x405aed
push 0x9c
lea eax, [ebp - 0xa0]
push edi
push eax
call fcn.004b2d10
push 0x94
lea ecx, [ebp - 0x134]
push edi
push ecx
mov dword [ebp - 0xa0], 0x9c
call fcn.004b2d10
add esp, 0x18
lea edx, [ebp - 0xa0]
push edx
mov dword [ebp - 0x134], 0x94
call esi
cmp eax, edi
jne 0x40575b
lea eax, [ebp - 0x134]
push eax
call esi
test eax, eax
jne 0x4058f5
pop esi
pop edi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a8a2f
mov esp, ebp
pop ebp
ret
movzx eax, word [ebp - 0x94]
mov ecx, dword [ebp - 0x9c]
mov edx, dword [ebp - 0x98]
mov dword [ebx + 8], eax
mov dword [ebx + 4], edx
lea eax, [ebp - 0x8c]
mov dword [ebx], ecx
lea edx, [ebx + 0x14]
mov ecx, eax
sub edx, ecx
mov esi, 1
mov cl, byte [eax]
mov byte [edx + eax], cl
add eax, esi
test cl, cl
jne 0x405788
mov ax, word [ebp - 0xa]
mov dx, word [ebp - 0xc]
mov word [ebx + 0x96], ax
mov eax, dword [ebp - 8]
mov word [ebx + 0x94], dx
test al, 1
je 0x4057b6
or dword [ebx + 0x12c], esi
test al, 2
je 0x4057c1
or dword [ebx + 0x12c], 2
test al, 0x10
je 0x4057cc
or dword [ebx + 0x12c], 0x10
test al, al
jns 0x4057d7
or dword [ebx + 0x12c], 0x20
test eax, 0x200
je 0x4057e5
or dword [ebx + 0x12c], 0x40
test eax, 0x400
je 0x4057f6
or dword [ebx + 0x12c], 0x80
test al, 0x40
je 0x405804
or dword [ebx + 0x12c], 0x100
test eax, 0x100
je 0x405815
or dword [ebx + 0x12c], 0x200
movzx eax, byte [ebp - 6]
sub eax, esi
je 0x405839
sub eax, esi
je 0x40582d
sub eax, esi
jne 0x40583f
mov dword [ebx + 0x130], esi
jmp 0x40583f
mov dword [ebx + 0x130], 2
jmp 0x40583f
mov dword [ebx + 0x130], edi
push 1
mov esi, ebx
call fcn.00405f40
mov edi, ebx
call fcn.00406380
mov eax, dword [ebp - 0x90]
dec eax
je 0x405870
dec eax
je 0x405867
dec eax
jne 0x405877
mov dword [ebx + 0xc], 4
jmp 0x405877
mov dword [ebx + 0xc], 3
jmp 0x405877
mov dword [ebx + 0xc], 2
mov ecx, dword [ebx]
mov edx, dword [ebx + 4]
mov eax, dword [ebx + 8]
mov dword [ebx + 0x9c], edx
mov dword [ebx + 0x98], ecx
mov ecx, dword [ebx + 0xc]
mov dword [ebx + 0xa0], eax
lea eax, [ebx + 0x14]
lea edx, [ebx + 0xa8]
mov dword [ebx + 0xa4], ecx
sub edx, eax
mov cl, byte [eax]
mov byte [eax + edx], cl
inc eax
test cl, cl
jne 0x4058a5
cmp dword [ebx + 0x98], 4
mov dx, word [ebx + 0x94]
mov ax, word [ebx + 0x96]
mov word [ebx + 0x128], dx
mov word [ebx + 0x12a], ax
jne 0x4058d9
call fcn.00405d00
cmp dword [ebx + 0x98], 5
jne 0x4058e9
mov esi, ebx
call fcn.00405d50
mov esi, ebx
call fcn.00405e20
jmp 0x405b4d
movzx eax, word [ebp - 0x128]
mov ecx, dword [ebp - 0x130]
mov edx, dword [ebp - 0x12c]
mov dword [ebx + 8], eax
mov dword [ebx + 4], edx
lea eax, [ebp - 0x120]
mov dword [ebx], ecx
lea edx, [ebx + 0x14]
mov ecx, eax
sub edx, ecx
lea ecx, [ecx]
mov cl, byte [eax]
mov byte [eax + edx], cl
inc eax
test cl, cl
jne 0x405920
mov esi, dword [ebp - 0x124]
cmp esi, 1
jne 0x405a36
mov ecx, dword [ebx + 0xa4]
mov dword [ebx + 0xc], 2
mov dword [ebx + 0x130], edi
cmp ecx, 2
jne 0x405972
mov eax, ebx
call fcn.004060b0
cmp eax, edi
je 0x4059df
mov edx, esi
mov eax, edx
mov word [ebx + 0x94], dx
mov word [ebx + 0x128], ax
mov edx, dword [ebx]
mov eax, dword [ebx + 4]
mov ecx, dword [ebx + 8]
mov dword [ebx + 0x98], edx
mov edx, dword [ebx + 0xc]
mov dword [ebx + 0xa4], edx
mov dword [ebx + 0x9c], eax
lea eax, [ebx + 0x14]
lea edx, [ebx + 0xa8]
mov dword [ebx + 0xa0], ecx
sub edx, eax
mov cl, byte [eax]
mov byte [eax + edx], cl
inc eax
test cl, cl
jne 0x4059a0
cmp esi, 2
jne 0x405b4d
cmp dword [ebx + 0x98], 4
jne 0x4059c3
mov esi, ebx
call fcn.00405d00
cmp dword [ebx + 0x98], 5
jne 0x4059d3
mov esi, ebx
call fcn.00405d50
mov esi, ebx
call fcn.00405e20
jmp 0x405b4d
cmp ecx, 2
jne 0x405972
mov eax, ebx
call fcn.004060e0
cmp eax, edi
je 0x405a04
mov edx, ecx
mov word [ebx + 0x94], cx
mov word [ebx + 0x128], dx
jmp 0x405972
cmp ecx, 2
jne 0x405972
mov eax, ebx
call fcn.00406110
cmp eax, edi
je 0x405972
mov eax, 1
mov ecx, eax
mov word [ebx + 0x94], ax
mov word [ebx + 0x128], cx
jmp 0x405972
cmp esi, 2
jne 0x405ad6
lea eax, [ebp - 0x120]
mov dword [ebx + 0xc], 3
lea edx, [eax + 1]
nop
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x405a50
sub eax, edx
cmp eax, edi
je 0x405a6d
lea edi, [ebp - 0x120]
call fcn.004061e0
movzx eax, ax
jmp 0x405a6f
xor eax, eax
push 0
mov esi, ebx
mov word [ebx + 0x94], ax
mov word [ebx + 0x128], ax
call fcn.00405f40
mov edi, ebx
call fcn.00406400
call fcn.00406300
mov esi, dword [ebp - 0x124]
xor edi, edi
cmp esi, edi
jne 0x405972
mov dword [ebx + 0xc], 2
mov dword [ebx + 0x98], 3
mov dword [ebx + 0x9c], 0xa
mov dword [ebx + 0xa0], edi
mov dword [ebx + 0xa4], 1
mov byte [ebx + 0xa8], 0
jmp 0x405b4d
cmp esi, 3
jne 0x405a9a
mov dword [ebx + 0xc], 4
mov dword [ebx + 0x130], edi
jmp 0x405972
call dword [sym.imp.KERNEL32.dll_GetVersion]
movzx ecx, al
shr eax, 8
movzx eax, al
mov edx, 3
mov dword [ebx + 0xc], edx
mov dword [ebx + 0xa4], edx
mov dword [ebx + 4], eax
mov dword [ebx + 0x9c], eax
lea eax, [ebx + 0x14]
lea edx, [ebx + 0xa8]
mov dword [ebx], ecx
mov dword [ebx + 8], edi
mov dword [ebx + 0x98], ecx
mov dword [ebx + 0xa0], edi
sub edx, eax
nop
mov cl, byte [eax]
mov byte [eax + edx], cl
inc eax
test cl, cl
jne 0x405b30
call fcn.00406220
mov word [ebx + 0x94], ax
mov word [ebx + 0x128], ax
mov eax, dword [ebp - 0x138]
push str.GetNativeSystemInfo
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x405b7b
lea ecx, [ebp - 0x15c]
push ecx
call eax
lea edx, [ebp - 0x180]
push edx
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
jmp 0x405b9b
lea eax, [ebp - 0x15c]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov ecx, 9
lea esi, [ebp - 0x15c]
lea edi, [ebp - 0x180]
rep movsd dword es:[edi], dword [esi]
movzx eax, word [ebp - 0x15c]
mov esi, 8
mov edi, 0xa
lea edx, [esi - 1]
lea ecx, [esi - 2]
cmp eax, edi
ja case.default.0x405bb6
jmp dword [eax*4 + 0x405ca8]
mov dword [ebx + 0x134], 1
jmp 0x405c2f
mov dword [ebx + 0x134], esi
jmp 0x405c2f
mov dword [ebx + 0x134], 2
jmp 0x405c2f
mov dword [ebx + 0x134], 9
jmp 0x405c2f
mov dword [ebx + 0x134], edi
jmp 0x405c2f
mov dword [ebx + 0x134], 3
jmp 0x405c2f
mov dword [ebx + 0x134], edx
jmp 0x405c2f
mov dword [ebx + 0x134], 4
jmp 0x405c2f
mov dword [ebx + 0x134], 5
jmp 0x405c2f
mov dword [ebx + 0x134], ecx
jmp 0x405c2f
mov dword [ebx + 0x134], 0
movzx eax, word [ebp - 0x180]
cmp eax, edi
ja case.default.0x405c3a
jmp dword [eax*4 + 0x405cd4]
mov dword [ebx + 0x10], 1
jmp 0x405c92
mov dword [ebx + 0x10], esi
jmp 0x405c92
mov dword [ebx + 0x10], 2
jmp 0x405c92
mov dword [ebx + 0x10], 9
jmp 0x405c92
mov dword [ebx + 0x10], edi
jmp 0x405c92
mov dword [ebx + 0x10], 3
jmp 0x405c92
mov dword [ebx + 0x10], edx
jmp 0x405c92
mov dword [ebx + 0x10], 4
jmp 0x405c92
mov dword [ebx + 0x10], 5
jmp 0x405c92
mov dword [ebx + 0x10], ecx
jmp 0x405c92
mov dword [ebx + 0x10], 0
mov ecx, dword [ebp - 4]
pop esi
xor ecx, ebp
mov eax, 1
pop edi
call fcn.004a8a2f
mov esp, ebp
pop ebp
ret