Function at 0x417110
Capabilities:
Get disk information
Get storage device properties

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x6c
mov esi, dword [ebp + 8]
mov eax, dword [esi]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_GetDriveTypeA]
sub esp, 4
cmp eax, 2
je 0x417140
xor edi, edi
lea esp, [ebp - 0xc]
mov eax, edi
pop ebx
pop esi
pop edi
pop ebp
ret 4
mov eax, dword [esi + 4]
lea ebx, [ebp - 0x28]
mov dword [ebp - 0x2c], 0
mov byte [ebp - 0x28], 0
mov dword [ebp - 0x30], ebx
add eax, 4
cmp eax, 0xf
ja 0x4172b0
mov ecx, ebx
xor edx, edx
mov dword [ebp - 0x4c], 4
mov dword [ecx + edx], 0x5c2e5c5c
mov ecx, dword [ebp - 0x4c]
mov eax, dword [ebp - 0x30]
mov edx, 0xf
mov dword [ebp - 0x2c], ecx
mov byte [eax + ecx], 0
mov eax, dword [esi]
mov ecx, dword [esi + 4]
mov edi, dword [ebp - 0x2c]
mov dword [ebp - 0x4c], eax
mov eax, dword [ebp - 0x30]
lea esi, [ecx + edi]
cmp eax, ebx
cmovne edx, dword [ebp - 0x28]
cmp esi, edx
ja 0x417360
test ecx, ecx
je 0x4171c0
add eax, edi
cmp ecx, 1
jne 0x417390
mov edx, dword [ebp - 0x4c]
movzx edx, byte [edx]
mov byte [eax], dl
mov eax, dword [ebp - 0x30]
lea esi, [esi]
mov dword [ebp - 0x2c], esi
mov byte [eax + esi], 0
mov eax, dword [ebp - 0x30]
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 3
mov dword [esp + 0xc], 0
mov dword [esp + 8], 3
mov dword [esp + 4], 0xc0000000
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
mov eax, dword [ebp - 0x30]
sub esp, 0x1c
cmp eax, ebx
je 0x417217
mov dword [esp], eax
call fcn.004ed8c0
cmp esi, 0xffffffff
je 0x41712f
lea eax, [ebp - 0x48]
lea edi, [ebp - 0x3c]
mov dword [ebp - 0x3c], 0
mov dword [ebp - 0x38], 0
mov byte [ebp - 0x34], 0
mov dword [esp + 0x18], eax
lea eax, [ebp - 0x44]
mov dword [ebp - 0x44], 0
mov dword [ebp - 0x40], 0
mov dword [ebp - 0x48], 0
mov dword [esp + 0x10], eax
mov eax, dword [sym.imp.KERNEL32.dll_DeviceIoControl]
mov dword [esp + 0x1c], 0
mov dword [esp + 0x14], 8
mov dword [esp + 0xc], 0xc
mov dword [esp + 8], edi
mov dword [esp + 4], 0x2d1400
mov dword [esp], esi
mov dword [ebp - 0x50], eax
call eax
sub esp, 0x20
test eax, eax
je 0x41729e
mov eax, dword [ebp - 0x40]
test eax, eax
mov dword [ebp - 0x4c], eax
jne 0x4173f0
mov dword [esp], esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
sub esp, 4
jmp 0x41712f
test eax, eax
js 0x4175bd
cmp eax, 0x1e
mov edi, 0x1e
cmovae edi, eax
lea eax, [edi + 1]
mov dword [esp], eax
call fcn.004ed900
mov edx, dword [ebp - 0x2c]
mov ecx, eax
lea eax, [edx + 1]
mov dword [ebp - 0x4c], eax
cmp dword [ebp - 0x4c], 1
mov eax, dword [ebp - 0x30]
mov dword [ebp - 0x50], eax
je 0x4173e0
cmp dword [ebp - 0x4c], 0
jne 0x4173b0
cmp eax, ebx
je 0x417308
mov dword [esp], eax
mov dword [ebp - 0x4c], ecx
call fcn.004ed8c0
mov edx, dword [ebp - 0x2c]
mov ecx, dword [ebp - 0x4c]
mov eax, 0x7fffffff
mov dword [ebp - 0x30], ecx
mov dword [ebp - 0x28], edi
sub eax, edx
cmp eax, 3
jbe 0x417598
lea eax, [edx + 4]
cmp eax, edi
mov dword [ebp - 0x4c], eax
jbe 0x41716b
lea ecx, [ebp - 0x30]
mov dword [esp + 0xc], 4
mov dword [esp + 8], str.._
mov dword [esp + 4], 0
mov dword [esp], edx
call fcn.004ce110
sub esp, 0x10
jmp 0x417172
mov eax, dword [ebp - 0x4c]
mov dword [esp + 0xc], ecx
lea ecx, [ebp - 0x30]
mov dword [esp + 4], 0
mov dword [esp], edi
mov dword [esp + 8], eax
call fcn.004ce110
sub esp, 0x10
mov eax, dword [ebp - 0x30]
jmp 0x4171c0
mov edx, dword [ebp - 0x4c]
mov dword [esp + 8], ecx
mov dword [esp], eax
mov dword [esp + 4], edx
call sub.msvcrt.dll_memcpy
mov eax, dword [ebp - 0x30]
jmp 0x4171c0
mov eax, dword [ebp - 0x4c]
mov dword [esp], ecx
mov dword [ebp - 0x54], edx
mov dword [ebp - 0x4c], ecx
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x50]
mov dword [esp + 4], eax
call sub.msvcrt.dll_memcpy
mov edx, dword [ebp - 0x54]
mov ecx, dword [ebp - 0x4c]
mov eax, dword [ebp - 0x50]
jmp 0x4172f3
movzx eax, byte [eax]
mov byte [ecx], al
mov eax, dword [ebp - 0x50]
jmp 0x4172f3
lea edx, [eax + 1]
mov dword [esp], edx
mov dword [ebp - 0x58], edx
call fcn.004ed8e0
mov ecx, dword [ebp - 0x4c]
mov dword [ebp - 0x54], eax
mov edx, dword [ebp - 0x58]
test ecx, ecx
js 0x417425
mov dword [esp + 8], edx
mov dword [esp + 4], 0
mov dword [esp], eax
call sub.msvcrt.dll_memset
mov edx, dword [ebp - 0x58]
mov eax, dword [ebp - 0x54]
mov dword [esp + 0xc], edx
mov dword [esp + 8], 0
mov dword [esp + 4], edx
mov dword [esp], eax
call fcn.004327e0
lea edx, [ebp - 0x48]
mov eax, dword [ebp - 0x54]
mov dword [esp + 0x1c], 0
mov dword [esp + 0xc], 0xc
mov dword [esp + 8], edi
mov dword [esp + 0x18], edx
mov edx, dword [ebp - 0x4c]
mov dword [esp + 0x10], eax
mov dword [esp + 4], 0x2d1400
mov dword [esp], esi
mov eax, dword [ebp - 0x50]
mov dword [esp + 0x14], edx
call eax
sub esp, 0x20
test eax, eax
mov edi, eax
je 0x417532
mov eax, dword [ebp - 0x54]
mov edi, dword [eax + 0xc]
test edi, edi
je 0x417511
add edi, eax
mov dword [ebp - 0x30], ebx
je 0x4175f2
mov dword [esp], edi
call sub.msvcrt.dll_strlen
cmp eax, 0xf
mov dword [ebp - 0x4c], eax
ja 0x417540
cmp dword [ebp - 0x4c], 1
je 0x41756c
mov edx, dword [ebp - 0x4c]
mov eax, ebx
test edx, edx
jne 0x4175cb
mov edx, dword [ebp - 0x4c]
lea edi, [ebp - 0x30]
mov dword [ebp - 0x2c], edx
mov byte [eax + edx], 0
mov dword [esp], edi
call fcn.0042d8e0
mov dword [esp + 8], 6
mov dword [esp + 4], 0
mov ecx, edi
mov dword [esp], str.huawei
call fcn.0045b2d0
sub esp, 0xc
cmp eax, 0xffffffff
je 0x417579
mov eax, dword [ebp - 0x30]
cmp eax, ebx
je 0x417511
mov dword [esp], eax
call fcn.004ed8c0
mov dword [esp], esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
sub esp, 4
mov edi, 1
mov eax, dword [ebp - 0x54]
mov dword [esp], eax
call fcn.004ed8b0
jmp 0x417131
mov dword [esp], esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
sub esp, 4
jmp 0x417522
add eax, 1
mov dword [esp], eax
call fcn.004ed900
mov edx, dword [ebp - 0x4c]
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x28], edx
mov dword [esp + 8], edx
mov dword [esp + 4], edi
mov dword [esp], eax
call sub.msvcrt.dll_memcpy
mov eax, dword [ebp - 0x30]
jmp 0x4174c7
movzx eax, byte [edi]
mov byte [ebp - 0x28], al
mov eax, ebx
jmp 0x4174c7
mov dword [esp], esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x30]
sub esp, 4
cmp eax, ebx
je 0x417594
mov dword [esp], eax
call fcn.004ed8c0
xor edi, edi
jmp 0x417522
mov dword [esp], 0x4fc695
call fcn.004e7d10
mov edx, dword [ebp - 0x30]
mov esi, eax
cmp edx, ebx
je 0x4175b5
mov dword [esp], edx
call fcn.004ed8c0
mov dword [esp], esi
call fcn.0043f8d0
mov dword [esp], 0x4fc506
call fcn.004e7d10
jmp 0x4175a4
mov edx, dword [ebp - 0x4c]
jmp 0x417554
mov dword [esp], 0x4fc4dc
call fcn.004e7b80
nop