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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x17c
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
push 4
push 0
mov dword [ebp - 4], ecx
push esi
call sub.MSVCRT.dll_memset
add esp, 0xc
push str.KERNEL32.DLL
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
test eax, eax
mov dword [ebp + 8], eax
je 0x401a27
push str.GetVersionExA
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov ebx, eax
test ebx, ebx
je 0x401d4c
mov edi, 0x9c
lea eax, [ebp - 0x17c]
push edi
push 0
push eax
call sub.MSVCRT.dll_memset
mov dword [ebp - 0x17c], edi
add edi, 0xfffffff8
push edi
lea eax, [ebp - 0xbc]
push 0
push eax
call sub.MSVCRT.dll_memset
add esp, 0x18
lea eax, [ebp - 0x17c]
mov dword [ebp - 0xbc], edi
push eax
call ebx
test eax, eax
jne 0x401a2e
lea eax, [ebp - 0xbc]
push eax
call ebx
test eax, eax
jne 0x401bc2
xor eax, eax
jmp 0x401ede
mov eax, dword [ebp - 0x178]
lea ecx, [ebp - 0x168]
mov dword [esi], eax
mov eax, dword [ebp - 0x174]
mov dword [esi + 4], eax
push ecx
movzx eax, word [ebp - 0x170]
mov dword [esi + 8], eax
lea eax, [esi + 0x14]
push eax
call sub.MSVCRT.dll_strcpy
mov ax, word [ebp - 0xe8]
pop ecx
pop ecx
mov word [esi + 0x94], ax
mov ecx, dword [ebp - 0xe4]
mov ax, word [ebp - 0xe6]
test cl, 1
mov word [esi + 0x96], ax
je 0x401a89
or dword [esi + 0x12c], 1
test cl, 2
je 0x401a95
or dword [esi + 0x12c], 2
test cl, 0x10
je 0x401aa1
or dword [esi + 0x12c], 0x10
test cl, 0x80
je 0x401aad
or dword [esi + 0x12c], 0x20
mov edx, 0x200
test dx, cx
je 0x401abe
or dword [esi + 0x12c], 0x40
test ch, 4
je 0x401aca
or byte [esi + 0x12c], 0x80
test cl, 0x40
mov eax, 0x100
je 0x401ada
or dword [esi + 0x12c], eax
test ax, cx
je 0x401ae5
or dword [esi + 0x12c], edx
movzx eax, byte [ebp - 0xe2]
dec eax
je 0x401b0d
dec eax
je 0x401b01
dec eax
jne 0x401b14
mov dword [esi + 0x130], 1
jmp 0x401b14
mov dword [esi + 0x130], 2
jmp 0x401b14
and dword [esi + 0x130], 0
mov ebx, dword [ebp - 4]
push 1
push esi
mov ecx, ebx
call fcn.00402131
push esi
mov ecx, ebx
call fcn.004025e2
mov eax, dword [ebp - 0x16c]
push 3
dec eax
pop edi
je 0x401b49
dec eax
je 0x401b44
dec eax
jne 0x401b50
mov dword [esi + 0xc], 4
jmp 0x401b50
mov dword [esi + 0xc], edi
jmp 0x401b50
mov dword [esi + 0xc], 2
mov eax, dword [esi]
mov dword [esi + 0x98], eax
mov eax, dword [esi + 4]
mov dword [esi + 0x9c], eax
mov eax, dword [esi + 8]
mov dword [esi + 0xa0], eax
mov eax, dword [esi + 0xc]
mov dword [esi + 0xa4], eax
lea eax, [esi + 0x14]
push eax
lea eax, [esi + 0xa8]
push eax
call sub.MSVCRT.dll_strcpy
mov ax, word [esi + 0x94]
pop ecx
pop ecx
mov word [esi + 0x128], ax
mov ax, word [esi + 0x96]
push 1
push esi
mov ecx, ebx
mov word [esi + 0x12a], ax
call fcn.00401f3d
push 1
push esi
mov ecx, ebx
call fcn.00401f98
push esi
mov ecx, ebx
call fcn.0040204a
jmp 0x401dac
mov eax, dword [ebp - 0xb8]
lea ecx, [ebp - 0xa8]
mov dword [esi], eax
mov eax, dword [ebp - 0xb4]
mov dword [esi + 4], eax
push ecx
movzx eax, word [ebp - 0xb0]
mov dword [esi + 8], eax
lea eax, [esi + 0x14]
push eax
call sub.MSVCRT.dll_strcpy
pop ecx
pop ecx
push 3
pop edi
push 1
pop ebx
cmp dword [ebp - 0xac], ebx
jne 0x401c5b
mov ecx, dword [ebp - 4]
and dword [esi + 0x130], 0
push esi
mov dword [esi + 0xc], 2
call fcn.0040229a
test eax, eax
je 0x401c2b
mov word [esi + 0x94], bx
mov word [esi + 0x128], bx
jmp 0x401cbb
mov ecx, dword [ebp - 4]
push esi
call fcn.004022ce
test eax, eax
je 0x401c4c
mov word [esi + 0x94], 2
mov word [esi + 0x128], 2
jmp 0x401cbb
mov ecx, dword [ebp - 4]
push esi
call fcn.00402338
test eax, eax
je 0x401cbb
jmp 0x401c18
cmp dword [ebp - 0xac], 2
jne 0x401ca5
mov ebx, dword [ebp - 4]
lea eax, [ebp - 0xa8]
push eax
mov ecx, ebx
mov dword [esi + 0xc], edi
call fcn.0040249d
push 0
push esi
mov ecx, ebx
mov word [esi + 0x94], ax
mov word [esi + 0x128], ax
call fcn.00402131
push esi
mov ecx, ebx
call fcn.00402652
push esi
mov ecx, ebx
call fcn.0040256f
push 1
pop ebx
jmp 0x401cbb
cmp dword [ebp - 0xac], edi
jne 0x401cbb
and dword [esi + 0x130], 0
mov dword [esi + 0xc], 4
cmp dword [ebp - 0xac], 0
jne 0x401cef
and dword [esi + 0xa0], 0
mov dword [esi + 0xc], 2
mov dword [esi + 0x98], edi
mov dword [esi + 0x9c], 0xa
mov dword [esi + 0xa4], ebx
push 0x4386b4
jmp 0x401d16
mov eax, dword [esi]
mov dword [esi + 0x98], eax
mov eax, dword [esi + 4]
mov dword [esi + 0x9c], eax
mov eax, dword [esi + 8]
mov dword [esi + 0xa0], eax
mov eax, dword [esi + 0xc]
mov dword [esi + 0xa4], eax
lea eax, [esi + 0x14]
push eax
lea eax, [esi + 0xa8]
push eax
call sub.MSVCRT.dll_strcpy
cmp dword [ebp - 0xac], 2
pop ecx
pop ecx
jne 0x401dac
mov ecx, dword [ebp - 4]
push 1
push esi
call fcn.00401f3d
mov ecx, dword [ebp - 4]
push 1
push esi
call fcn.00401f98
mov ecx, dword [ebp - 4]
push esi
jmp 0x401bb8
call dword [sym.imp.KERNEL32.dll_GetVersion]
xor edx, edx
and dword [esi + 8], 0
mov dl, ah
push 3
movzx ecx, al
movzx eax, dl
and dword [esi + 0xa0], 0
mov dword [esi + 4], eax
mov dword [esi + 0x9c], eax
pop edi
lea eax, [esi + 0x14]
mov dword [esi], ecx
push eax
lea eax, [esi + 0xa8]
push eax
mov dword [esi + 0xc], edi
mov dword [esi + 0x98], ecx
mov dword [esi + 0xa4], edi
call sub.MSVCRT.dll_strcpy
pop ecx
pop ecx
mov ecx, dword [ebp - 4]
call fcn.004024df
mov word [esi + 0x94], ax
mov word [esi + 0x128], ax
push str.GetNativeSystemInfo
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x401dd3
lea ecx, [ebp - 0x28]
push ecx
call eax
lea eax, [ebp - 0xe0]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
jmp 0x401df2
lea eax, [ebp - 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
lea eax, [ebp - 0x28]
push 0x24
push eax
lea eax, [ebp - 0xe0]
push eax
call sub.MSVCRT.dll_memcpy
add esp, 0xc
movzx eax, word [ebp - 0x28]
push 7
cmp eax, 0xa
pop ebx
push 5
pop edx
push 6
pop ecx
ja case.default.0x401e04
jmp dword [eax*4 + 0x401ee5]
mov dword [esi + 0x134], 1
jmp 0x401e7a
mov dword [esi + 0x134], 8
jmp 0x401e7a
mov dword [esi + 0x134], 2
jmp 0x401e7a
mov dword [esi + 0x134], 9
jmp 0x401e7a
mov dword [esi + 0x134], 0xa
jmp 0x401e7a
mov dword [esi + 0x134], edi
jmp 0x401e7a
mov dword [esi + 0x134], ebx
jmp 0x401e7a
mov dword [esi + 0x134], 4
jmp 0x401e7a
mov dword [esi + 0x134], edx
jmp 0x401e7a
mov dword [esi + 0x134], ecx
jmp 0x401e7a
and dword [esi + 0x134], 0
movzx eax, word [ebp - 0xe0]
cmp eax, 0xa
ja case.default.0x401e86
jmp dword [eax*4 + 0x401f11]
mov dword [esi + 0x10], 1
jmp 0x401edb
mov dword [esi + 0x10], 8
jmp 0x401edb
mov dword [esi + 0x10], 2
jmp 0x401edb
mov dword [esi + 0x10], 9
jmp 0x401edb
mov dword [esi + 0x10], 0xa
jmp 0x401edb
mov dword [esi + 0x10], edi
jmp 0x401edb
mov dword [esi + 0x10], ebx
jmp 0x401edb
mov dword [esi + 0x10], 4
jmp 0x401edb
mov dword [esi + 0x10], edx
jmp 0x401edb
mov dword [esi + 0x10], ecx
jmp 0x401edb
and dword [esi + 0x10], 0
push 1
pop eax
pop edi
pop esi
pop ebx
leave
ret 4