Function at 0x42a12e
Capabilities:
Get disk information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x168
push ebx
push esi
mov esi, dword [ebp + 8]
lea eax, [ebp - 0x28]
push edi
push eax
push esi
call sym.ruby187g.exc_rb_w32_stat
pop ecx
test eax, eax
pop ecx
jl 0x42a3b0
test byte [ebp - 0x21], 0x40
jne 0x42a1c7
mov al, byte [esi]
cmp al, 0x80
jae 0x42a1b6
mov ecx, dword [sym.imp.MSVCRT.dll___mb_cur_max]
cmp dword [ecx], 1
jle 0x42a17b
movzx eax, al
push 0x103
push eax
call dword [sym.imp.MSVCRT.dll__isctype]
pop ecx
pop ecx
jmp 0x42a18f
mov ecx, dword [sym.imp.MSVCRT.dll__pctype]
movzx eax, al
mov ecx, dword [ecx]
mov ax, word [ecx + eax*2]
and eax, 0x103
test eax, eax
je 0x42a1b6
cmp byte [esi + 1], 0x3a
jne 0x42a1b6
cmp byte [esi + 2], 0
jne 0x42a1b6
call dword [sym.imp.KERNEL32.dll_GetLogicalDrives]
mov cl, byte [esi]
push 1
and ecx, 0x5f
pop edx
sub ecx, 0x41
shl edx, cl
test edx, eax
jne 0x42a1c7
call dword [sym.imp.MSVCRT.dll__errno]
mov dword [eax], 0x14
jmp 0x42a3b0
lea eax, [ebp - 0x168]
push eax
push esi
call fcn.0042a3b7
pop ecx
cmp eax, 0xffffffff
pop ecx
mov dword [ebp + 8], eax
je 0x42a3b0
push 1
push 0x120
call dword [sym.imp.MSVCRT.dll_calloc]
mov esi, eax
pop ecx
test esi, esi
pop ecx
je 0x42a3b0
lea eax, [ebp - 0x13c]
push eax
call sub.MSVCRT.dll_strlen
mov ebx, dword [sym.imp.MSVCRT.dll_malloc]
mov edi, eax
inc edi
push edi
call ebx
pop ecx
mov dword [esi], eax
test eax, eax
pop ecx
je 0x42a394
push 1
call ebx
test eax, eax
pop ecx
mov dword [esi + 0x11c], eax
je 0x42a394
lea eax, [ebp - 0x13c]
push eax
push dword [esi]
call sub.MSVCRT.dll_strcpy
mov eax, dword [esi + 0x11c]
pop ecx
pop ecx
and byte [eax], 0
test byte [ebp - 0x168], 0x10
je 0x42a25d
mov eax, dword [esi + 0x11c]
or byte [eax], 1
test byte [ebp - 0x167], 4
je 0x42a26f
mov eax, dword [esi + 0x11c]
or byte [eax], 2
inc dword [esi + 0xc]
lea eax, [ebp - 0x168]
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
je 0x42a37f
mov ebx, dword [sym.imp.MSVCRT.dll_realloc]
lea eax, [ebp - 0x13c]
push eax
call sub.MSVCRT.dll_strlen
inc eax
add eax, edi
push eax
mov dword [ebp - 4], eax
push dword [esi]
call ebx
add esp, 0xc
test eax, eax
je 0x42a394
mov dword [esi], eax
lea ecx, [ebp - 0x13c]
add eax, edi
push ecx
push eax
call sub.MSVCRT.dll_strcpy
pop ecx
pop ecx
mov ecx, dword [esi + 0xc]
push 4
mov eax, ecx
pop edi
cdq
idiv edi
test edx, edx
jne 0x42a301
mov eax, ecx
push edi
cdq
pop ecx
idiv ecx
inc eax
push eax
push dword [esi + 0x11c]
call ebx
pop ecx
pop ecx
mov ecx, eax
test ecx, ecx
je 0x42a394
mov eax, dword [esi + 0xc]
mov dword [esi + 0x11c], ecx
cdq
idiv edi
and byte [eax + ecx], 0
test byte [ebp - 0x168], 0x10
je 0x42a330
mov ecx, dword [esi + 0xc]
push 8
shl ecx, 1
mov eax, ecx
pop edi
cdq
idiv edi
mov edx, dword [esi + 0x11c]
push 8
lea edi, [eax + edx]
mov eax, ecx
cdq
pop ecx
idiv ecx
mov al, 1
mov ecx, edx
shl al, cl
or byte [edi], al
test byte [ebp - 0x167], 4
je 0x42a361
mov eax, dword [esi + 0xc]
push 8
pop edi
lea ecx, [eax + eax + 1]
push 8
mov eax, ecx
cdq
idiv edi
mov edx, dword [esi + 0x11c]
lea edi, [eax + edx]
mov eax, ecx
cdq
pop ecx
idiv ecx
mov al, 1
mov ecx, edx
shl al, cl
or byte [edi], al
inc dword [esi + 0xc]
mov edi, dword [ebp - 4]
lea eax, [ebp - 0x168]
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x42a290
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_FindClose]
mov eax, dword [esi]
mov dword [esi + 8], edi
mov dword [esi + 4], eax
mov eax, esi
jmp 0x42a3b2
push esi
call sym.ruby187g.exc_rb_w32_closedir
pop ecx
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_FindClose]
call dword [sym.imp.MSVCRT.dll__errno]
mov dword [eax], 0xc
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret