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

Disassembly:
push ebp
lea ebp, [esp - 0x78]
sub esp, 0xd4
lea eax, [ebp - 0x5c]
push eax
mov dword [ebp - 0x5c], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
mov eax, dword [ebp - 0x58]
mov dword [ebx], eax
mov eax, dword [ebp - 0x54]
mov dword [ebx + 4], eax
mov eax, dword [ebp - 0x50]
mov dword [ebx + 8], eax
lea eax, [ebp - 0x48]
push eax
call fcn.0044e5e0
test eax, eax
pop ecx
jg 0x405483
mov byte [ebx + 0xc], 0
cmp dword [ebp - 0x4c], 2
mov byte [ebx + 0x10c], 0
mov byte [ebx + 0x10d], 0
mov byte [ebx + 0x120], 0
mov byte [ebx + 0x10e], 0
mov byte [ebx + 0x10f], 0
mov byte [ebx + 0x114], 0
mov byte [ebx + 0x115], 0
mov byte [ebx + 0x110], 0
mov byte [ebx + 0x111], 0
mov byte [ebx + 0x116], 0
mov byte [ebx + 0x117], 0
mov byte [ebx + 0x118], 0
mov byte [ebx + 0x119], 0
mov byte [ebx + 0x112], 0
mov byte [ebx + 0x113], 0
mov byte [ebx + 0x11c], 0
mov byte [ebx + 0x11d], 0
mov byte [ebx + 0x11a], 0
mov byte [ebx + 0x11b], 0
mov byte [ebx + 0x11e], 0
mov byte [ebx + 0x11f], 0
jne 0x405555
mov eax, dword [ebx]
sub eax, 4
mov byte [ebx + 0x10c], 1
je 0x405545
dec eax
je 0x4054e1
dec eax
jne 0x4055a9
mov eax, dword [ebx + 4]
test eax, eax
mov byte [ebx + 0x10f], 1
jne 0x4054af
mov byte [ebx + 0x115], 1
mov byte [ebx + 0x111], 1
mov byte [ebx + 0x119], 1
mov byte [ebx + 0x118], 1
jmp 0x4055a9
lea ecx, [ebp + eax - 0x48]
cmp byte [ecx], 0x20
jne 0x405488
mov byte [ecx], 0
dec eax
test eax, eax
jg 0x405477
xor ecx, ecx
test eax, eax
jle 0x40549a
cmp byte [ebp + ecx - 0x48], 0x20
jne 0x40549a
inc ecx
cmp ecx, eax
jl 0x40548e
lea eax, [ebp + ecx - 0x48]
push eax
lea eax, [ebx + 0xc]
push eax
call fcn.0044ddf0
pop ecx
pop ecx
jmp 0x40538b
cmp eax, 1
jne 0x4055a9
mov byte [ebx + 0x111], al
mov byte [ebx + 0x117], al
mov byte [ebx + 0x115], al
mov byte [ebx + 0x119], al
mov byte [ebx + 0x113], al
mov byte [ebx + 0x112], al
jmp 0x4055a9
mov eax, dword [ebx + 4]
test eax, eax
mov byte [ebx + 0x10f], 1
jne 0x405502
mov byte [ebx + 0x115], 1
mov byte [ebx + 0x114], 1
jmp 0x4055a9
cmp eax, 1
jne 0x40551e
mov byte [ebx + 0x115], al
mov byte [ebx + 0x111], al
mov byte [ebx + 0x110], al
jmp 0x4055a9
cmp eax, 2
jb 0x4055a9
mov byte [ebx + 0x115], 1
mov byte [ebx + 0x111], 1
mov byte [ebx + 0x117], 1
mov byte [ebx + 0x116], 1
jmp 0x4055a9
mov byte [ebx + 0x10f], 1
mov byte [ebx + 0x10e], 1
jmp 0x4055a9
movzx eax, word [ebp - 0x50]
mov dword [ebx + 8], eax
mov eax, dword [ebx + 4]
test eax, eax
mov byte [ebx + 0x10d], 1
mov byte [ebx + 0x11d], 1
je 0x4055a2
cmp eax, 0xa
je 0x405592
cmp eax, 0x5a
jne 0x4055a9
mov byte [ebx + 0x11b], 1
mov byte [ebx + 0x11f], 1
mov byte [ebx + 0x11e], 1
jmp 0x4055a9
mov byte [ebx + 0x11b], 1
mov byte [ebx + 0x11a], 1
jmp 0x4055a9
mov byte [ebx + 0x11c], 1
and dword [ebp + 0x74], 0
push esi
push edi
push str.kernel32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
test eax, eax
mov dword [ebp + 0x5c], eax
je 0x4055d3
push str.IsWow64Process
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
mov esi, eax
jne 0x4055d8
mov esi, 0x40d8af
lea eax, [ebp + 0x74]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call esi
cmp dword [ebp + 0x74], 1
jne 0x4055f2
mov byte [ebx + 0x120], 1
and dword [ebp + 0x38], 0
push 8
xor eax, eax
cmp byte [ebx + 0x120], al
pop ecx
lea edi, [ebp + 0x3c]
rep stosd dword es:[edi], eax
mov edi, dword [sym.imp.KERNEL32.dll_FreeLibrary]
je 0x405644
and dword [ebp + 0x68], eax
and dword [ebp + 0x70], eax
lea esi, [ebp + 0x68]
call fcn.004056a5
test al, al
je 0x405637
call fcn.004056a5
test al, al
mov eax, dword [ebp + 0x70]
jne 0x405631
mov eax, 0x404684
lea ecx, [ebp + 0x38]
push ecx
call eax
cmp dword [ebp + 0x68], 0
je 0x40564e
push dword [ebp + 0x68]
call edi
jmp 0x40564e
lea eax, [ebp + 0x38]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov eax, dword [ebp + 0x38]
test ax, ax
jne 0x405662
mov dword [ebx + 0x124], 1
jmp 0x405691
cmp ax, 6
jne 0x405674
mov dword [ebx + 0x124], 2
jmp 0x405691
cmp ax, 9
jne 0x405686
mov dword [ebx + 0x124], 3
jmp 0x405691
movzx eax, ax
neg eax
mov dword [ebx + 0x124], eax
cmp dword [ebp + 0x5c], 0
je 0x40569c
push dword [ebp + 0x5c]
call edi
pop edi
mov eax, ebx
pop esi
add ebp, 0x78
leave
ret