Function at 0x51f590
Capabilities:
Get disk information
Get process image filename

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x575de8
mov eax, dword fs:[0]
push eax
sub esp, 0x440
mov eax, dword [0x5d6b80]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
mov edi, dword [ebp + 0x14]
mov ebx, dword [ebp + 0xc]
mov dword [ebp - 0x43c], eax
mov dword [ebp - 0x448], edi
mov dword [ebp - 0x44c], 0
call fcn.0045adc0
mov ecx, eax
xor eax, eax
test ecx, ecx
setne al
test eax, eax
jne 0x51f5f9
push 0x80004005
call fcn.0045a8f0
mov eax, dword [ecx]
call dword [eax + 0xc]
lea esi, [eax + 0x10]
mov dword [ebp - 0x424], esi
xor eax, eax
mov dword [ebp - 4], 0
push 0x206
push eax
mov word [ebp - 0x218], ax
lea eax, [ebp - 0x216]
push eax
call fcn.00525ee0
xor eax, eax
push 0x206
push eax
mov word [ebp - 0x420], ax
lea eax, [ebp - 0x41e]
push eax
call fcn.00525ee0
add esp, 0x18
cmp dword [ebp + 0x10], 2
jge 0x51f746
push 0x104
lea eax, [ebp - 0x218]
push eax
push 0
push ebx
call sub.PSAPI.DLL_GetModuleFileNameExW
test eax, eax
je 0x51f746
or ebx, 0xffffffff
lea eax, [ebp - 0x218]
cmp dword [ebp + 0x10], 1
push eax
jne 0x51f68a
lea ecx, [ebp - 0x424]
call fcn.0045a5f0
jmp 0x51f705
lea ecx, [ebp - 0x428]
call fcn.0045a3a0
lea eax, [ebp - 0x428]
mov byte [ebp - 4], 1
push eax
lea eax, [ebp - 0x434]
push eax
call fcn.0051f0b0
add esp, 8
push eax
lea ecx, [ebp - 0x424]
mov byte [ebp - 4], 2
call fcn.0045a580
mov edx, dword [ebp - 0x434]
mov ecx, ebx
add edx, 0xfffffff0
mov byte [ebp - 4], 1
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x51f6e2
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x428]
mov ecx, ebx
add edx, 0xfffffff0
mov byte [ebp - 4], 0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x51f705
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov esi, dword [ebp - 0x424]
add esi, 0xfffffff0
push esi
call fcn.0045a950
mov edi, dword [ebp - 0x43c]
add eax, 0x10
add esp, 4
mov dword [ebp - 4], 0xffffffff
mov dword [edi], eax
lea eax, [esi + 0xc]
lock xadd dword [eax], ebx
dec ebx
test ebx, ebx
jg 0x51fa45
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
jmp 0x51fa45
push 0x104
lea eax, [ebp - 0x218]
push eax
push ebx
call sub.PSAPI.DLL_GetProcessImageFileNameW
or ebx, 0xffffffff
test eax, eax
je 0x51fa07
cmp dword [ebp + 0x10], 2
jne 0x51f7ca
lea ecx, [ebp - 0x218]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x51f772
sub ecx, edx
lea eax, [ebp - 0x218]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x424]
call fcn.0045b6e0
mov esi, dword [ebp - 0x424]
add esi, 0xfffffff0
push esi
call fcn.0045a950
mov edi, dword [ebp - 0x43c]
add eax, 0x10
add esp, 4
mov dword [ebp - 4], 0xffffffff
or ecx, 0xffffffff
mov dword [edi], eax
lea eax, [esi + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jmp 0x51fa3b
lea eax, [ebp - 0x218]
push eax
lea ecx, [ebp - 0x430]
call fcn.0045a3a0
lea eax, [ebp - 0x420]
mov byte [ebp - 4], 3
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetLogicalDriveStringsW]
test eax, eax
je 0x51f9d6
lea eax, [ebp - 0x420]
mov dword [ebp - 0x440], 0
mov dword [ebp - 0x428], eax
mov dword [ebp - 0x438], 0
lea ebx, [ebx]
push eax
lea ecx, [ebp - 0x444]
call fcn.0045a3a0
lea eax, [ebp - 0x438]
mov byte [ebp - 4], 4
push eax
lea eax, [ebp - 0x440]
push eax
lea eax, [ebp - 0x444]
push eax
lea eax, [ebp - 0x42c]
push eax
call fcn.00520360
add esp, 0x10
mov edx, dword [ebp - 0x444]
mov ecx, ebx
add edx, 0xfffffff0
mov byte [ebp - 4], 6
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x51f877
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edi, dword [ebp - 0x440]
cmp edi, 0xffffffff
je 0x51f941
push 0x5c
push 0x5c
lea ecx, [ebp - 0x42c]
call fcn.00520550
mov ecx, eax
call fcn.005204b0
push 0x104
lea eax, [ebp - 0x218]
push eax
push dword [ebp - 0x42c]
call dword [sym.imp.KERNEL32.dll_QueryDosDeviceW]
test eax, eax
je 0x51f913
lea eax, [ebp - 0x218]
push eax
lea ecx, [ebp - 0x434]
call fcn.0045a3a0
push dword [ebp - 0x42c]
lea eax, [ebp - 0x218]
mov byte [ebp - 4], 7
push eax
lea ecx, [ebp - 0x430]
call fcn.004601f0
test eax, eax
jne 0x51f974
mov edx, dword [ebp - 0x434]
mov ecx, ebx
add edx, 0xfffffff0
mov byte [ebp - 4], 6
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x51f92a
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x51f92a
cmp dword [ebp - 0x448], 0
je 0x51f92a
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp - 0x448]
mov dword [ecx], eax
mov eax, dword [ebp - 0x428]
lea eax, [eax + edi*2]
xor edi, edi
mov dword [ebp - 0x428], eax
mov dword [ebp - 0x440], edi
mov edx, dword [ebp - 0x42c]
mov ecx, ebx
add edx, 0xfffffff0
mov byte [ebp - 4], 3
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x51f964
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
cmp edi, 0xffffffff
je 0x51f9e2
mov eax, dword [ebp - 0x428]
jmp 0x51f820
cmp dword [ebp + 0x10], 1
lea eax, [ebp - 0x430]
push eax
jne 0x51f98e
lea ecx, [ebp - 0x424]
call fcn.0045a580
jmp 0x51f9b8
lea eax, [ebp - 0x438]
push eax
call fcn.0051f0b0
add esp, 8
push eax
lea ecx, [ebp - 0x424]
mov byte [ebp - 4], 8
call fcn.0045a580
lea ecx, [ebp - 0x438]
call fcn.0048ceb0
lea ecx, [ebp - 0x434]
call fcn.0048ceb0
lea ecx, [ebp - 0x42c]
call fcn.0048ceb0
mov esi, dword [ebp - 0x424]
jmp 0x51f9e2
test edi, edi
je 0x51f9e2
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [edi], eax
mov edx, dword [ebp - 0x430]
mov ecx, ebx
add edx, 0xfffffff0
mov byte [ebp - 4], 0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x51fa13
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x51fa13
test edi, edi
je 0x51fa13
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [edi], eax
add esi, 0xfffffff0
push esi
call fcn.0045a950
mov edi, dword [ebp - 0x43c]
add eax, 0x10
add esp, 4
mov dword [ebp - 4], 0xffffffff
mov dword [edi], eax
lea eax, [esi + 0xc]
lock xadd dword [eax], ebx
dec ebx
test ebx, ebx
jg 0x51fa45
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00525878
mov esp, ebp
pop ebp
ret