Function at 0x4b9ef0
Capabilities:
Get disk information
Get disk size

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x5f8
mov eax, dword [0x5322a8]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
mov edx, dword [0x502578]
push esi
push edi
push 0xa
mov dword [ebp - 0x5ec], eax
mov eax, dword [0x50257c]
push 0
mov dword [ebp - 0x5c4], eax
mov dword [ebp - 0x5dc], ecx
mov ecx, dword [0x502580]
mov dword [ebp - 0x5c8], edx
mov edx, dword [0x502584]
push 0
lea eax, [ebp - 0x5c8]
push eax
mov dword [ebp - 0x5c0], ecx
mov dword [ebp - 0x5bc], edx
call dword [sym.imp.SETUPAPI.dll_SetupDiGetClassDevsW]
mov esi, eax
mov dword [ebp - 0x5d4], esi
test esi, esi
jne 0x4b9f72
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004e3946
mov esp, ebp
pop ebp
ret
push 0x1c
call fcn.004e4629
add esp, 4
mov edi, eax
push edi
push 0
push esi
mov dword [ebp - 0x5d0], edi
mov dword [edi], 0x1c
mov dword [ebp - 0x5cc], 0
call dword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInfo]
test eax, eax
je 0x4ba33b
xor ecx, ecx
push 0xfe
push ecx
lea edx, [ebp - 0x1b6]
push edx
mov word [ebp - 0x1b8], cx
call fcn.004e7d90
add esp, 0xc
push 0
push 0x7f
lea eax, [ebp - 0x1b8]
push eax
push 0
push 0xc
push edi
push esi
call dword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceRegistryPropertyW]
test eax, eax
jne 0x4b9ff3
push eax
push 0x7f
lea ecx, [ebp - 0x1b8]
push ecx
push eax
push eax
push edi
push esi
call dword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceRegistryPropertyW]
lea edx, [ebp - 0x1b8]
push str.USB_Device
push edx
call fcn.004e49bf
add esp, 8
test eax, eax
je 0x4ba310
xor eax, eax
push 0x1fe
push eax
lea ecx, [ebp - 0x5b6]
push ecx
mov word [ebp - 0x5b8], ax
call fcn.004e7d90
add esp, 0xc
push 0
push pe_nt_image_headers32
lea edx, [ebp - 0x5b8]
push edx
push edi
push esi
call dword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceInstanceIdW]
test eax, eax
je 0x4ba310
xor eax, eax
lea ecx, [ebp - 0x5b8]
push ecx
lea edx, [ebp - 0x38]
push edx
lea ecx, [ebp - 0x5d8]
mov word [ebp - 0x38], ax
mov dword [ebp - 0x36], eax
mov dword [ebp - 0x32], eax
mov dword [ebp - 0x2e], eax
mov dword [ebp - 0x2a], eax
mov dword [ebp - 0x26], eax
mov dword [ebp - 0x22], eax
mov dword [ebp - 0x1e], eax
mov word [ebp - 0x1a], ax
mov dword [ebp - 0x5d8], eax
call fcn.004b0290
add esp, 8
test eax, eax
je 0x4ba310
mov eax, dword [ebp + 0xc]
cmp dword [ebp - 0x5d8], eax
jne 0x4ba310
xor eax, eax
lea ecx, [ebp - 0x5f8]
push ecx
lea edx, [ebp - 0x5e8]
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x5e8], eax
mov dword [ebp - 0x5e4], eax
mov dword [ebp - 0x5f8], eax
mov dword [ebp - 0x5f4], eax
push edx
lea eax, [ebp - 0x18]
push eax
lea ecx, [ebp - 0x38]
push ecx
call dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceExW]
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x15
je 0x4ba310
mov ecx, dword [ebp - 0x5e8]
mov eax, dword [ebp - 0x5e4]
mov edx, ecx
or edx, eax
je 0x4ba310
shl eax, 0x16
shr ecx, 0xa
add ecx, eax
xor eax, eax
ja 0x4ba127
jb 0x4ba117
cmp ecx, 0x800
jae 0x4ba127
push eax
push ecx
push 0x527730
lea eax, [ebp - 0xb8]
push eax
jmp 0x4ba13c
shrd ecx, eax, 0xa
shr eax, 0xa
push eax
push ecx
push 0x527740
lea ecx, [ebp - 0xb8]
push ecx
call dword [sym.imp.USER32.dll_wsprintfW]
mov eax, ebx
add esp, 0x10
lea edx, [eax + 2]
lea ebx, [ebx]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4ba150
sub eax, edx
sar eax, 1
mov edi, eax
lea eax, [ebp - 0x1b8]
lea edx, [eax + 2]
lea ebx, [ebx]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4ba170
sub eax, edx
sar eax, 1
mov edx, eax
lea eax, [ebp - 0xb8]
lea esi, [eax + 2]
lea ebx, [ebx]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4ba190
sub eax, esi
sar eax, 1
add eax, edx
lea edx, [eax + edi + 4]
cmp edx, 0x1000
jae 0x4ba32f
mov esi, dword [ebp - 0x5ec]
mov eax, esi
lea edx, [eax + 2]
lea esp, [esp]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4ba1c0
sub eax, edx
lea ecx, [ebp - 0xb8]
push ecx
lea edx, [ebp - 0x5b8]
push edx
sar eax, 1
lea eax, [esi + eax*2]
push str._s__s__
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
lea eax, [ebp - 0x38]
add esp, 0x10
mov ecx, eax
mov dx, word [eax]
add eax, 2
test dx, dx
jne 0x4ba1f4
sub eax, ecx
mov esi, ecx
lea edi, [ebx - 2]
mov cx, word [edi + 2]
add edi, 2
test cx, cx
jne 0x4ba206
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
mov eax, ebx
rep movsb byte es:[edi], byte [esi]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4ba225
mov edi, dword [sym.imp.USER32.dll_wsprintfW]
sub eax, edx
lea ecx, [ebp - 0xb8]
push ecx
lea edx, [ebp - 0x1b8]
push edx
sar eax, 1
lea eax, [ebx + eax*2]
push str._s__s_
push eax
call edi
xor ecx, ecx
push 0x1fe
push ecx
lea edx, [ebp - 0x3b6]
push edx
mov word [ebp - 0x3b8], cx
call fcn.004e7d90
lea eax, [ebp - 0x3b8]
push eax
lea edx, [ebp - 0x38]
call fcn.004b9b00
mov eax, ebx
add esp, 0x20
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4ba285
sub eax, edx
lea ecx, [ebp - 0x3b8]
sar eax, 1
lea esi, [ecx + 2]
lea ecx, [ecx]
mov dx, word [ecx]
add ecx, 2
test dx, dx
jne 0x4ba2a0
sub ecx, esi
sar ecx, 1
lea ecx, [ecx + eax + 4]
cmp ecx, 0x1000
jae 0x4ba32f
mov eax, ebx
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4ba2c0
sub eax, edx
lea edx, [ebp - 0x3b8]
push edx
sar eax, 1
lea eax, [ebx + eax*2]
push str.__s_
push eax
call edi
add esp, 0xc
lea edi, [ebx - 2]
jmp 0x4ba2f0
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x4ba2f0
mov ecx, dword [0x51d580]
mov esi, dword [ebp - 0x5d4]
mov dword [edi], ecx
mov edi, dword [ebp - 0x5d0]
inc dword [ebp - 0x5cc]
mov edx, dword [ebp - 0x5cc]
push edi
push edx
push esi
call dword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInfo]
test eax, eax
jne 0x4b9fa6
jmp 0x4ba33b
mov edi, dword [ebp - 0x5d0]
mov esi, dword [ebp - 0x5d4]
xor eax, eax
mov dword [edi], eax
mov dword [edi + 4], eax
mov dword [edi + 8], eax
mov dword [edi + 0xc], eax
mov dword [edi + 0x10], eax
mov dword [edi + 0x14], eax
push edi
mov dword [edi + 0x18], eax
call fcn.004e41ab
add esp, 4
push esi
call dword [sym.imp.SETUPAPI.dll_SetupDiDestroyDeviceInfoList]
mov edi, dword [sym.imp.KERNEL32.dll_GetDriveTypeW]
xor esi, esi
lea esp, [esp]
xor eax, eax
mov dword [ebp - 0x16], eax
mov dword [ebp - 0x12], eax
jmp 0x4ba380
movzx ecx, word [eax + 0x523b1c]
mov word [ebp + eax - 0x18], cx
add eax, 2
test cx, cx
jne 0x4ba380
lea ecx, [ebp - 0x18]
lea eax, [esi + 0x41]
push ecx
mov word [ebp - 0x18], ax
call edi
sub eax, 2
je 0x4ba3ab
dec eax
je 0x4ba3ba
jmp 0x4ba3c9
mov eax, dword [ebp - 0x5dc]
mov edx, 0x32
mov word [eax + esi*2], dx
mov edx, dword [ebp - 0x5dc]
mov ecx, 0x33
mov word [edx + esi*2], cx
inc esi
cmp esi, 0x1a
jl 0x4ba370
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
mov eax, 1
pop esi
call fcn.004e3946
mov esp, ebp
pop ebp
ret