Function at 0x40b670
Capabilities:
Get disk information via ioctl

Disassembly:
push 0xffffffffffffffff
push 0x44a1a9
mov eax, dword fs:[0]
push eax
sub esp, 0x204
mov eax, dword [0x45e7b0]
xor eax, esp
mov dword [esp + 0x200], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x45e7b0]
xor eax, esp
push eax
lea eax, [esp + 0x218]
mov dword fs:[0], eax
mov edi, ecx
mov dword [esp + 0x34], edi
add edi, 4
call fcn.0040d4a0
push 0x100
lea eax, [esp + 0x118]
push eax
xor ebp, ebp
push ebp
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
call fcn.004156e6
xor ecx, ecx
cmp eax, ebp
setne cl
cmp ecx, ebp
jne 0x40b6e9
push 0x80004005
call fcn.0040b0a0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x1c], eax
mov dword [esp + 0x220], ebp
mov dword [esp + 0x18], 0x20
mov dword [esp + 0x20], ebp
mov edi, dword [esp + 0x18]
lea edi, [edi + edi*8]
shl edi, 4
add edi, 0xc0
push edi
mov dword [esp + 0x5c], 0
call fcn.004324c5
mov ebx, eax
add esp, 4
mov dword [esp + 0x2c], ebx
test ebx, ebx
je 0x40be29
push edi
push 0
push ebx
call fcn.004335b0
add esp, 0xc
push ebp
lea ecx, [esp + 0x20]
push str..PhysicalDrive_d
push ecx
call fcn.0040a6c0
mov edx, dword [esp + 0x28]
add esp, 0xc
push 0
push 0
push 3
push 0
push 3
push SysReAllocStringLen
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x40bdb9
push 0
lea eax, [esp + 0x5c]
push eax
push edi
push ebx
push 0
push 0
push 0x70050
push esi
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
push esi
test eax, eax
jne 0x40b7cb
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
call fcn.004323e8
add esp, 4
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x40bdb9
mov ecx, dword [esp + 0x18]
lea edx, [ecx + ecx]
mov dword [esp + 0x18], edx
jmp 0x40b70c
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x18]
push eax
mov ecx, ebx
call fcn.0040c410
mov eax, dword [esp + 0x18]
inc eax
add ebx, 0x30
mov dword [esp + 0x24], 0
mov dword [esp + 0x30], 1
cmp eax, 1
je 0x40bdac
mov ecx, dword [esp + 0x2c]
add ecx, 0xc0
mov dword [esp + 0x38], ecx
mov edx, dword [ebx + 0x10]
or edx, dword [ebx + 0x14]
je 0x40bd87
inc dword [esp + 0x24]
call fcn.004156e6
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
je 0x40b6df
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x50], eax
mov byte [esp + 0x220], 1
call fcn.004156e6
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
je 0x40b6df
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x48], eax
mov byte [esp + 0x220], 2
call fcn.004156e6
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
je 0x40b6df
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x44], eax
lea ecx, [esp + 0x64]
call fcn.00402cf0
push ebp
lea edi, [esp + 0x44]
mov byte [esp + 0x224], 4
call fcn.0040b450
mov byte [esp + 0x220], 5
mov ecx, dword [eax]
mov esi, dword [esp + 0x6c]
lea eax, [ecx - 0x10]
add esi, 0xfffffff0
cmp eax, esi
je 0x40b916
cmp dword [esi + 0xc], 0
lea edi, [esi + 0xc]
jl 0x40b908
mov edx, dword [eax]
cmp edx, dword [esi]
jne 0x40b908
push eax
call fcn.0040af90
mov ebp, eax
add esp, 4
or eax, 0xffffffff
lock xadd dword [edi], eax
dec eax
test eax, eax
jg 0x40b8fb
mov ecx, dword [esi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push esi
call eax
add ebp, 0x10
mov dword [esp + 0x6c], ebp
mov ebp, dword [esp + 0x20]
jmp 0x40b916
mov eax, dword [ecx - 0xc]
push eax
push ecx
lea ecx, [esp + 0x74]
call fcn.0040aef0
mov byte [esp + 0x220], 4
mov eax, dword [esp + 0x40]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40b93e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [esp + 0x78], ebp
mov ecx, 0x24
mov esi, ebx
lea edi, [esp + 0x84]
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [ebx + 0x18]
push ecx
push ebp
lea edx, [esp + 0x68]
push edx
call fcn.0040b1d0
mov byte [esp + 0x220], 6
mov ecx, dword [eax]
mov esi, dword [esp + 0x64]
lea eax, [ecx - 0x10]
add esi, 0xfffffff0
cmp eax, esi
je 0x40b9c4
cmp dword [esi + 0xc], 0
lea edi, [esi + 0xc]
jl 0x40b9b6
mov edx, dword [eax]
cmp edx, dword [esi]
jne 0x40b9b6
push eax
call fcn.0040af90
mov ebp, eax
add esp, 4
or eax, 0xffffffff
lock xadd dword [edi], eax
dec eax
test eax, eax
jg 0x40b9a9
mov ecx, dword [esi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push esi
call eax
add ebp, 0x10
mov dword [esp + 0x64], ebp
mov ebp, dword [esp + 0x20]
jmp 0x40b9c4
mov eax, dword [ecx - 0xc]
push eax
push ecx
lea ecx, [esp + 0x6c]
call fcn.0040aef0
mov byte [esp + 0x220], 4
mov eax, dword [esp + 0x60]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40b9ec
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
cmp dword [ebx], 0
jne 0x40ba8d
movzx ebx, byte [ebx + 0x20]
lea ecx, [esp + 0x7c]
lea esi, [esp + 0x4c]
call fcn.0040be60
mov byte [esp + 0x220], 7
mov ecx, dword [eax]
mov esi, dword [esp + 0x70]
lea eax, [ecx - 0x10]
add esi, 0xfffffff0
cmp eax, esi
je 0x40ba65
cmp dword [esi + 0xc], 0
lea edi, [esi + 0xc]
jl 0x40ba57
mov edx, dword [eax]
cmp edx, dword [esi]
jne 0x40ba57
push eax
call fcn.0040af90
mov ebx, eax
add esp, 4
or eax, 0xffffffff
lock xadd dword [edi], eax
dec eax
test eax, eax
jg 0x40ba4e
mov ecx, dword [esi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push esi
call eax
add ebx, 0x10
mov dword [esp + 0x70], ebx
jmp 0x40ba65
mov eax, dword [ecx - 0xc]
push eax
push ecx
lea ecx, [esp + 0x78]
call fcn.0040aef0
mov byte [esp + 0x220], 4
mov eax, dword [esp + 0x4c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40ba8d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x24]
push ecx
lea edx, [ebp + 1]
push edx
lea eax, [esp + 0x7c]
push str._d:_d
push eax
call fcn.0040a6c0
mov esi, dword [esp + 0x74]
push 0x452aa2
push esi
call fcn.00432247
add esp, 0x18
test eax, eax
sete al
test al, al
je 0x40bbe4
call fcn.004156e6
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
je 0x40b6df
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x28], eax
mov byte [esp + 0x220], 8
mov ecx, dword [esp + 0x9c]
mov edx, dword [esp + 0x78]
push ecx
push edx
lea eax, [esp + 0x30]
push str.DeviceHarddisk_dPartition_d
push eax
call fcn.0040a6c0
mov edi, dword [esp + 0x38]
add esp, 0x10
push edi
push 0x452840
push 1
call dword [sym.imp.KERNEL32.dll_DefineDosDeviceA]
push ecx
mov ecx, esp
mov dword [esp + 0x40], esp
push 0x452840
call fcn.0040a8e0
lea esi, [esp + 0x60]
call fcn.0040c280
mov byte [esp + 0x220], 9
mov ecx, dword [eax]
mov esi, dword [esp + 0x68]
lea eax, [ecx - 0x10]
add esi, 0xfffffff0
cmp eax, esi
je 0x40bb9e
cmp dword [esi + 0xc], 0
lea ebx, [esi + 0xc]
jl 0x40bb90
mov edx, dword [eax]
cmp edx, dword [esi]
jne 0x40bb90
push eax
call fcn.0040af90
mov ebp, eax
add esp, 4
or eax, 0xffffffff
lock xadd dword [ebx], eax
dec eax
test eax, eax
jg 0x40bb83
mov ecx, dword [esi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push esi
call eax
add ebp, 0x10
mov dword [esp + 0x68], ebp
mov ebp, dword [esp + 0x20]
jmp 0x40bb9e
mov eax, dword [ecx - 0xc]
push eax
push ecx
lea ecx, [esp + 0x70]
call fcn.0040aef0
mov byte [esp + 0x220], 8
mov eax, dword [esp + 0x5c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40bbc6
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push edi
push 0x452840
push 7
call dword [sym.imp.KERNEL32.dll_DefineDosDeviceA]
mov byte [esp + 0x220], 4
lea eax, [edi - 0x10]
jmp 0x40bcc2
push ecx
mov ecx, dword [esi - 0x10]
mov edx, dword [ecx]
mov eax, dword [edx + 0x10]
add esi, 0xfffffff0
mov dword [esp + 0x40], esp
mov ebx, esp
call eax
cmp dword [esi + 0xc], 0
lea ecx, [esi + 0xc]
jl 0x40bc12
cmp eax, dword [esi]
jne 0x40bc12
mov edi, esi
mov edx, 1
lock xadd dword [ecx], edx
jmp 0x40bc46
mov ecx, dword [esi + 4]
mov edx, dword [eax]
mov edx, dword [edx]
push 1
push ecx
mov ecx, eax
call edx
mov edi, eax
test edi, edi
je 0x40be58
mov eax, dword [esi + 4]
mov dword [edi + 4], eax
mov eax, dword [esi + 4]
inc eax
push eax
add esi, 0x10
push esi
push eax
lea ecx, [edi + 0x10]
push ecx
call fcn.00431405
add esp, 0x10
add edi, 0x10
lea esi, [esp + 0x58]
mov dword [ebx], edi
call fcn.0040c280
mov byte [esp + 0x220], 0xa
mov ecx, dword [eax]
mov esi, dword [esp + 0x68]
lea eax, [ecx - 0x10]
add esi, 0xfffffff0
cmp eax, esi
je 0x40bcb3
cmp dword [esi + 0xc], 0
lea edi, [esi + 0xc]
jl 0x40bca5
mov edx, dword [eax]
cmp edx, dword [esi]
jne 0x40bca5
push eax
call fcn.0040af90
mov ebx, eax
add esp, 4
or eax, 0xffffffff
lock xadd dword [edi], eax
dec eax
test eax, eax
jg 0x40bc9c
mov ecx, dword [esi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push esi
call eax
add ebx, 0x10
mov dword [esp + 0x68], ebx
jmp 0x40bcb3
mov eax, dword [ecx - 0xc]
push eax
push ecx
lea ecx, [esp + 0x70]
call fcn.0040aef0
mov byte [esp + 0x220], 4
mov eax, dword [esp + 0x54]
add eax, 0xfffffff0
or edx, 0xffffffff
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40bcdb
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
sub esp, 0xb0
mov ecx, esp
mov dword [esp + 0xec], esp
push ecx
lea ecx, [esp + 0x118]
call fcn.00402e40
mov ebx, dword [esp + 0xe4]
add ebx, 4
call fcn.0040d3d0
lea ecx, [esp + 0x64]
call fcn.00402da0
mov byte [esp + 0x220], 2
mov eax, dword [esp + 0x44]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40bd37
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x220], 1
mov eax, dword [esp + 0x48]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40bd5f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x220], 0
mov eax, dword [esp + 0x50]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40bd87
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x38]
mov ecx, dword [esp + 0x30]
mov ebx, eax
add eax, 0x90
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0x18]
inc ecx
inc eax
mov dword [esp + 0x30], ecx
cmp ecx, eax
jne 0x40b80c
mov ecx, dword [esp + 0x2c]
push ecx
call fcn.004323e8
add esp, 4
inc ebp
cmp ebp, 0x14
mov dword [esp + 0x20], ebp
jl 0x40b70c
mov ecx, dword [esp + 0x34]
mov dword [esp + 0x220], 0xffffffff
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
cmp dword [ecx + 0x10], 0
je 0x40be3b
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40bdfc
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, 1
mov ecx, dword [esp + 0x218]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x200]
xor ecx, esp
call fcn.004311a6
add esp, 0x210
ret
mov dword [esp + 0x220], 0xffffffff
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40be54
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
jmp 0x40be01
call fcn.0040af80
int3