Function at 0x40f530
Capabilities:
Get disk information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x12c
push edi
push esi
push ebx
mov edi, dword [ebp + 8]
mov ebx, dword [ebp + 0x10]
xor esi, esi
mov dword [ebp - 0x11c], 1
cmp dword [0x411470], 0
jne 0x40f560
call fcn.0040f368
test eax, eax
je 0x40f587
test edi, edi
je 0x40f64d
cmp byte [edi], 0
je 0x40f64d
add esp, 0xfffffff4
push edi
call sub.KERNEL32.dll_lstrlenA
mov esi, eax
add esp, 0xc
cmp esi, 0x104
jbe 0x40f590
xor eax, eax
jmp 0x40f7d1
xor edx, edx
cmp edx, esi
ja 0x40f5b4
lea ecx, [ebp - 0x110]
mov al, byte [edx + edi]
cmp al, 0x2f
jne 0x40f5ac
mov byte [edx + ecx], 0x5c
jmp 0x40f5af
mov byte [edx + ecx], al
inc edx
cmp edx, esi
jbe 0x40f59c
mov al, byte [ebp - 0x10f]
cmp byte [ebp - 0x110], 0x5c
jne 0x40f628
cmp al, 0x5c
jne 0x40f628
xor eax, eax
mov edx, 2
cmp edx, esi
jae 0x40f602
cmp byte [ebp - 0x10e], 0x5c
sete al
and eax, 0xff
lea esi, [esi]
inc edx
cmp edx, esi
jae 0x40f602
lea ecx, [ebp - 0x110]
cmp byte [edx + ecx], 0x5c
jne 0x40f5e4
inc eax
cmp eax, 2
jne 0x40f5e4
inc edx
mov byte [edx + ecx], 0
mov esi, edx
cmp eax, 1
jne 0x40f64d
lea edx, [ebp - 0x110]
cmp byte [esi + edx], 0x5c
je 0x40f64d
mov al, byte [ebp - 0x110]
mov byte [esi + edx], al
lea eax, [esi + 1]
mov byte [eax + edx], 0
mov esi, eax
jmp 0x40f64d
cmp al, 0x3a
jne 0x40f644
mov byte [ebp - 0x10e], 0x5c
mov byte [ebp - 0x10d], 0
mov esi, 3
jmp 0x40f64d
mov byte [ebp - 0x110], 0
xor esi, esi
add esp, 0xfffffff4
push 0x45de10
call sub.KERNEL32.dll_EnterCriticalSection
add esp, 0xc
cmp dword [0x45dce0], 0
je 0x40f685
add esp, 0xfffffff8
lea eax, [ebp - 0x110]
push eax
push 0x45dcfc
call sub.KERNEL32.dll_lstrcmpiA
add esp, 8
test eax, eax
je 0x40f787
mov dword [ebp - 0x118], 0
xor edi, edi
add esp, 0xfffffff4
push 0x45de10
call sub.KERNEL32.dll_LeaveCriticalSection
add esp, 0xfffffffc
push 0
push 0
lea eax, [ebp - 0x114]
push eax
push 0
push 0
push 0
push 0
xor eax, eax
cmp byte [ebp - 0x110], 0
je 0x40f6c5
lea eax, [ebp - 0x110]
push eax
call sub.KERNEL32.dll_GetVolumeInformationA
mov dword [ebp - 0x11c], eax
add esp, 0x10
test eax, eax
je 0x40f723
test byte [ebp - 0x114], 8
je 0x40f723
cmp dword [ebx + 8], 0
je 0x40f723
add esp, 0xfffffff4
xor eax, eax
cmp byte [ebp - 0x110], 0
je 0x40f6fb
lea eax, [ebp - 0x110]
push eax
call sub.KERNEL32.dll_GetDriveTypeA
add esp, 0xc
cmp eax, 4
jne 0x40f723
mov edi, 1
add esp, 0xfffffff8
lea eax, [ebp - 0x118]
push eax
push dword [ebp + 0xc]
call fcn.0040f434
add esp, 0x10
add esp, 0xfffffff4
push 0x45de10
call sub.KERNEL32.dll_EnterCriticalSection
add esp, 0xc
cmp dword [ebp - 0x11c], 0
je 0x40f7b4
add esp, 0xfffffffc
lea eax, [esi + 1]
push eax
lea eax, [ebp - 0x110]
push eax
push 0x45dcfc
call sub.KERNEL32.dll_lstrcpynA
mov dword [0x45dce4], 0
mov eax, dword [ebp - 0x114]
mov dword [0x45dcec], eax
mov dword [0x45dcf0], edi
mov eax, dword [ebp - 0x118]
mov dword [0x45dcf4], eax
mov dword [0x45dce0], 1
add esp, 4
cmp dword [ebp - 0x11c], 0
je 0x40f7b4
mov eax, dword [ebx + 8]
mov dword [0x45dce8], eax
mov eax, dword [ebx + 0x18]
mov dword [0x45dcf8], eax
mov edi, ebx
mov esi, 0x45dce0
cld
mov ecx, 0x49
rep movsd dword es:[edi], dword [esi]
jmp 0x40f7be
mov dword [0x45dce0], 0
add esp, 0xfffffff4
push 0x45de10
call sub.KERNEL32.dll_LeaveCriticalSection
mov eax, dword [ebp - 0x11c]
lea esp, [ebp - 0x138]
pop ebx
pop esi
pop edi
leave
ret