Function at 0x432590
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.ruby187c.exc_rb_w32_stat
pop ecx
test eax, eax
pop ecx
jl 0x432812
test byte [ebp - 0x21], 0x40
jne 0x432629
mov al, byte [esi]
cmp al, 0x80
jae 0x432618
mov ecx, dword [sym.imp.MSVCRT.dll___mb_cur_max]
cmp dword [ecx], 1
jle 0x4325dd
movzx eax, al
push 0x103
push eax
call dword [sym.imp.MSVCRT.dll__isctype]
pop ecx
pop ecx
jmp 0x4325f1
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 0x432618
cmp byte [esi + 1], 0x3a
jne 0x432618
cmp byte [esi + 2], 0
jne 0x432618
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 0x432629
call dword [sym.imp.MSVCRT.dll__errno]
mov dword [eax], 0x14
jmp 0x432812
lea eax, [ebp - 0x168]
push eax
push esi
call fcn.00432819
pop ecx
cmp eax, 0xffffffff
pop ecx
mov dword [ebp + 8], eax
je 0x432812
push 1
push 0x120
call dword [sym.imp.MSVCRT.dll_calloc]
mov esi, eax
pop ecx
test esi, esi
pop ecx
je 0x432812
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 0x4327f6
push 1
call ebx
test eax, eax
pop ecx
mov dword [esi + 0x11c], eax
je 0x4327f6
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 0x4326bf
mov eax, dword [esi + 0x11c]
or byte [eax], 1
test byte [ebp - 0x167], 4
je 0x4326d1
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 0x4327e1
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 0x4327f6
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 0x432763
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 0x4327f6
mov eax, dword [esi + 0xc]
mov dword [esi + 0x11c], ecx
cdq
idiv edi
and byte [eax + ecx], 0
test byte [ebp - 0x168], 0x10
je 0x432792
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 0x4327c3
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 0x4326f2
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 0x432814
push esi
call sym.ruby187c.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