Function at 0x10186830
Capabilities:
Get disk information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2a4
mov eax, dword [0x10254be4]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
lea eax, [ebp - 0x3c]
push eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.101832c0
add esp, 8
test eax, eax
jge 0x1018685f
xor eax, eax
jmp 0x10186bc5
movzx edx, word [ebp - 0x36]
and edx, 0x4000
jne 0x101868e6
mov eax, 1
imul ecx, eax, 0
mov edx, dword [ebp + 0xc]
movzx eax, byte [edx + ecx]
push eax
call sym.ruby.dll_rb_isalpha
add esp, 4
test eax, eax
je 0x101868d3
mov ecx, 1
shl ecx, 0
mov edx, dword [ebp + 0xc]
movsx eax, byte [edx + ecx]
cmp eax, 0x3a
jne 0x101868d3
mov ecx, 1
shl ecx, 1
mov edx, dword [ebp + 0xc]
movsx eax, byte [edx + ecx]
test eax, eax
jne 0x101868d3
mov ecx, 1
imul edx, ecx, 0
mov eax, dword [ebp + 0xc]
movsx ecx, byte [eax + edx]
and ecx, 0x5f
sub ecx, 0x41
mov esi, 1
shl esi, cl
call dword [sym.imp.KERNEL32.dll_GetLogicalDrives]
and esi, eax
jne 0x101868e6
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [eax], 0x14
xor eax, eax
jmp 0x10186bc5
lea ecx, [ebp - 0x28c]
push ecx
mov edx, dword [ebp + 8]
push edx
call fcn.101866e0
add esp, 8
mov dword [ebp - 0x298], eax
cmp dword [ebp - 0x298], 0xffffffff
jne 0x1018690f
xor eax, eax
jmp 0x10186bc5
push 1
push 0x28
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_calloc]
add esp, 8
mov dword [ebp - 0x290], eax
cmp dword [ebp - 0x290], 0
jne 0x10186932
xor eax, eax
jmp 0x10186bc5
mov dword [ebp - 0x294], 0
lea eax, [ebp - 0x260]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
add eax, 1
mov dword [ebp - 0x29c], eax
mov ecx, dword [ebp - 0x294]
add ecx, dword [ebp - 0x29c]
shl ecx, 1
push ecx
mov edx, dword [ebp - 0x290]
mov eax, dword [edx]
push eax
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_realloc]
add esp, 8
mov dword [ebp - 0x2a0], eax
cmp dword [ebp - 0x2a0], 0
jne 0x101869b1
mov ecx, dword [ebp - 0x290]
push ecx
call sym.ruby.dll_rb_w32_closedir
add esp, 4
mov edx, dword [ebp - 0x298]
push edx
call dword [sym.imp.KERNEL32.dll_FindClose]
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [eax], 0xc
xor eax, eax
jmp 0x10186bc5
mov eax, dword [ebp - 0x290]
mov ecx, dword [ebp - 0x2a0]
mov dword [eax], ecx
mov edx, dword [ebp - 0x29c]
shl edx, 1
push edx
lea eax, [ebp - 0x260]
push eax
mov ecx, dword [ebp - 0x290]
mov edx, dword [ecx]
mov eax, dword [ebp - 0x294]
lea ecx, [edx + eax*2]
push ecx
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
mov edx, dword [ebp - 0x290]
mov eax, dword [edx + 0xc]
and eax, 0x80000003
jns 0x101869fe
dec eax
or eax, 0xfffffffc
inc eax
test eax, eax
jne 0x10186a6d
mov ecx, dword [ebp - 0x290]
mov eax, dword [ecx + 0xc]
cdq
and edx, 3
add eax, edx
sar eax, 2
add eax, 1
push eax
mov edx, dword [ebp - 0x290]
mov eax, dword [edx + 0x24]
push eax
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_realloc]
add esp, 8
mov dword [ebp - 0x2a4], eax
cmp dword [ebp - 0x2a4], 0
jne 0x10186a3f
jmp 0x10186982
mov ecx, dword [ebp - 0x290]
mov edx, dword [ebp - 0x2a4]
mov dword [ecx + 0x24], edx
mov eax, dword [ebp - 0x290]
mov eax, dword [eax + 0xc]
cdq
and edx, 3
add eax, edx
sar eax, 2
mov ecx, dword [ebp - 0x290]
mov edx, dword [ecx + 0x24]
mov byte [edx + eax], 0
mov eax, dword [ebp - 0x28c]
and eax, 0x10
je 0x10186ada
mov ecx, dword [ebp - 0x290]
mov eax, dword [ecx + 0xc]
shl eax, 1
cdq
and edx, 7
add eax, edx
sar eax, 3
mov edx, dword [ebp - 0x290]
mov edx, dword [edx + 0x24]
mov ecx, dword [ebp - 0x290]
mov ecx, dword [ecx + 0xc]
shl ecx, 1
and ecx, 0x80000007
jns 0x10186aad
dec ecx
or ecx, 0xfffffff8
inc ecx
mov esi, 1
shl esi, cl
movsx ecx, byte [edx + eax]
or ecx, esi
mov edx, dword [ebp - 0x290]
mov eax, dword [edx + 0xc]
shl eax, 1
cdq
and edx, 7
add eax, edx
sar eax, 3
mov edx, dword [ebp - 0x290]
mov edx, dword [edx + 0x24]
mov byte [edx + eax], cl
mov eax, dword [ebp - 0x28c]
and eax, 0x400
je 0x10186b4f
mov ecx, dword [ebp - 0x290]
mov edx, dword [ecx + 0xc]
lea eax, [edx + edx + 1]
cdq
and edx, 7
add eax, edx
sar eax, 3
mov ecx, dword [ebp - 0x290]
mov edx, dword [ecx + 0x24]
mov ecx, dword [ebp - 0x290]
mov ecx, dword [ecx + 0xc]
lea ecx, [ecx + ecx + 1]
and ecx, 0x80000007
jns 0x10186b20
dec ecx
or ecx, 0xfffffff8
inc ecx
mov esi, 1
shl esi, cl
movsx ecx, byte [edx + eax]
or ecx, esi
mov edx, dword [ebp - 0x290]
mov eax, dword [edx + 0xc]
lea eax, [eax + eax + 1]
cdq
and edx, 7
add eax, edx
sar eax, 3
mov edx, dword [ebp - 0x290]
mov edx, dword [edx + 0x24]
mov byte [edx + eax], cl
mov eax, dword [ebp - 0x290]
mov ecx, dword [eax + 0xc]
add ecx, 1
mov edx, dword [ebp - 0x290]
mov dword [edx + 0xc], ecx
mov eax, dword [ebp - 0x294]
add eax, dword [ebp - 0x29c]
mov dword [ebp - 0x294], eax
lea ecx, [ebp - 0x28c]
push ecx
mov edx, dword [ebp - 0x298]
push edx
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x1018693c
mov eax, dword [ebp - 0x298]
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
mov ecx, dword [ebp - 0x290]
mov edx, dword [ebp - 0x294]
mov dword [ecx + 8], edx
mov eax, dword [ebp - 0x290]
mov ecx, dword [ebp - 0x290]
mov edx, dword [ecx]
mov dword [eax + 4], edx
mov eax, dword [ebp - 0x290]
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.101949b1
mov esp, ebp
pop ebp
ret