Function at 0x40fb50
Capabilities:
Check os version
Get disk information

Disassembly:
sub esp, 0x354
push ebx
push ebp
push esi
push edi
call dword [sym.imp.Kernel32.dll_GetLogicalDrives]
mov dword [esp + 0x28], eax
call fcn.0040f870
xor ebx, ebx
mov esi, 2
mov dword [0x4a9b8c], ebx
mov dword [esp + 0x18], esi
mov eax, 1
mov ecx, esi
shl eax, cl
mov ecx, dword [esp + 0x28]
test ecx, eax
je 0x40fddc
lea edx, [esi + 0x41]
lea eax, [esp + 0x44]
push edx
push 0x4a3eb8
push eax
call fcn.0043ef3e
add esp, 0xc
lea ecx, [esp + 0x64]
lea edx, [esp + 0x44]
push 0x100
push ecx
push edx
call dword [sym.imp.Kernel32.dll_QueryDosDeviceA]
test eax, eax
je 0x40fddc
lea eax, [esp + 0x64]
push str.Harddisk
push eax
call fcn.0043f630
add esp, 8
test eax, eax
je 0x40fddc
mov eax, dword [0x4a9b8c]
mov dl, byte [esp + 0x44]
push 0x4a3bec
lea ecx, [eax + eax*2]
lea eax, [esp + 0x68]
push eax
mov byte [ecx*4 + 0x4a9930], dl
call fcn.0043f630
add esp, 8
test eax, eax
jne 0x40fc81
lea ecx, [esp + 0x64]
push 0x4a3ea8
push ecx
call fcn.0043f630
add esp, 8
test eax, eax
jne 0x40fc81
lea edi, [esp + 0x64]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x164]
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x164]
push ecx
call fcn.004566af
mov eax, dword [0x4a9b8c]
lea ecx, [esp + 0x168]
lea eax, [eax + eax*2]
shl eax, 2
lea edx, [eax + 0x4a9938]
lea eax, [eax + 0x4a9934]
push edx
push eax
push str.DEVICEHARDDISK_dPARTITION_d
push ecx
call fcn.0043f5f7
add esp, 0x14
jmp 0x40fdcd
call dword [sym.imp.Kernel32.dll_GetVersion]
and eax, 0xff
cmp eax, 5
jb 0x40fdcd
xor ebp, ebp
xor edi, edi
push edi
push ebp
lea edx, [esp + 0x26c]
push str.DeviceHarddisk_dPartition_d
push edx
call fcn.0043ef3e
add esp, 0x10
lea eax, [esp + 0x264]
lea ecx, [esp + 0x10]
push eax
push ecx
call dword [0x4a9ba0]
lea edx, [esp + 0x10]
push 1
lea eax, [esp + 0x24]
push edx
push eax
call dword [0x4a9564]
lea edx, [esp + 0x2c]
lea eax, [esp + 0x1c]
push edx
lea ecx, [esp + 0x24]
push 0x20001
push eax
mov dword [esp + 0x38], 0x18
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x44], pe_nt_image_headers32
mov dword [esp + 0x40], ecx
mov dword [esp + 0x48], ebx
mov dword [esp + 0x4c], ebx
call dword [0x4a9b98]
test eax, eax
jne 0x40fd8b
mov edx, dword [esp + 0x1c]
lea ecx, [esp + 0x20]
push ebx
push ecx
push edx
call dword [0x4a9b88]
mov eax, dword [esp + 0x1c]
push eax
call dword [0x4a9bb0]
lea ecx, [esp + 0x20]
push 1
lea edx, [esp + 0x14]
push ecx
push edx
call dword [0x4a9c38]
mov eax, dword [esp + 0x14]
lea esi, [esp + 0x64]
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x40fd6c
cmp cl, bl
je 0x40fd68
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x40fd6c
add eax, 2
add esi, 2
cmp cl, bl
jne 0x40fd48
xor eax, eax
jmp 0x40fd71
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, ebx
je 0x40fda0
lea eax, [esp + 0x20]
push eax
call dword [0x4a9b9c]
lea ecx, [esp + 0x10]
push ecx
call dword [0x4a9c3c]
inc edi
cmp edi, 0x20
jl 0x40fc99
inc ebp
cmp ebp, 0x40
jge 0x40fdcd
jmp 0x40fc97
mov eax, dword [0x4a9b8c]
lea edx, [esp + 0x20]
push edx
lea eax, [eax + eax*2]
shl eax, 2
mov dword [eax + 0x4a9934], ebp
mov dword [eax + 0x4a9938], edi
call dword [0x4a9b9c]
lea eax, [esp + 0x10]
push eax
call dword [0x4a9c3c]
mov eax, dword [0x4a9b8c]
mov esi, dword [esp + 0x18]
inc eax
mov dword [0x4a9b8c], eax
inc esi
cmp esi, 0x20
mov dword [esp + 0x18], esi
jb 0x40fb7a
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x354
ret