Function at 0x405000
Capabilities:
Get disk information

Disassembly:
push 0xffffffffffffffff
push 0x4e372b
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x334
mov eax, dword [esp + 0x344]
push ebx
push ebp
mov ebp, ecx
xor ecx, ecx
cmp eax, 1
sete cl
xor ebx, ebx
push esi
push edi
cmp ecx, ebx
mov dword [esp + 0x10], ecx
je 0x40503c
xor eax, eax
cmp eax, ebx
mov dword [esp + 0x18], ebx
je 0x405059
cmp word [eax], 0x3f
jne 0x405059
add eax, 2
mov dword [esp + 0x18], eax
mov dword [esp + 0x10], 1
push 0x4ec070
lea ecx, [esp + 0x18]
call fcn.00404170
mov eax, dword [ebp + 0x5c]
mov eax, dword [eax + 0x1c]
push 0xffff0000
push ebx
push 0x1101
push eax
mov dword [esp + 0x35c], ebx
call dword [sym.imp.USER32.dll_SendMessageW]
xor eax, eax
mov ecx, 0x64
lea edi, [esp + 0x34]
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x1c4]
push ecx
push 0x180
mov word [esp + 0x1cc], bx
mov dword [esp + 0x30], ebx
mov dword [esp + 0x28], ebx
mov dword [esp + 0x24], ebx
call dword [sym.imp.KERNEL32.dll_GetLogicalDriveStringsW]
mov eax, dword [ebp + 0x54]
mov edx, dword [eax + 8]
xor ecx, ecx
cmp edx, ebx
mov dword [esp + 0x30], eax
mov dword [esp + 0x2c], edx
mov dword [esp + 0x24], ecx
jg 0x4051a6
mov eax, dword [ebp + 0x58]
mov ecx, dword [eax + 0xe4]
test ecx, ecx
lea esi, [esp + 0x1c4]
jne 0x4050f2
test edx, edx
jg 0x4053e1
cmp word [esp + 0x1c4], 0
je 0x4053e1
xor edi, edi
test ebx, ebx
jle 0x405122
mov ecx, dword [esp + edi*4 + 0x34]
push ecx
push esi
call fcn.004af274
add esp, 8
test eax, eax
je 0x4053ca
inc edi
cmp edi, ebx
jl 0x405107
push 1
push 0
push esi
mov dword [esp + ebx*4 + 0x40], esi
push 0xffff0000
mov ecx, ebp
inc ebx
call fcn.004044d0
mov edi, eax
test edi, edi
je 0x4053ca
mov eax, dword [esp + 0x20]
test eax, eax
jne 0x405152
mov dword [esp + 0x20], esi
mov dword [esp + 0x28], edi
mov eax, dword [esp + 0x18]
test eax, eax
je 0x40535f
cmp word [eax], 0
jne 0x40516a
mov dword [esp + 0x18], esi
mov eax, esi
test eax, eax
je 0x40535f
push eax
push esi
call fcn.004af274
add esp, 8
test eax, eax
jne 0x40535f
mov ecx, dword [esp + 0x10]
or ecx, 0x20
test esi, esi
mov dword [esp + 0x10], ecx
jne 0x405336
jmp 0x40533f
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x24]
xor ebx, ebx
cmp ecx, ebx
jl 0x405331
mov edx, dword [eax + 8]
cmp ecx, edx
jge 0x405331
mov eax, dword [eax + 4]
mov esi, dword [eax + ecx*4]
lea edi, [ecx*4]
inc ecx
js 0x405331
cmp ecx, edx
jge 0x405331
mov ebx, dword [eax + edi + 4]
test ebx, ebx
je 0x4051e5
cmp word [ebx], 0
jne 0x4051e5
xor ebx, ebx
mov eax, dword [esp + 0x1c]
xor edi, edi
test eax, eax
jle 0x40520f
nop
mov edx, dword [esp + edi*4 + 0x34]
push edx
push esi
call fcn.004af274
add esp, 8
test eax, eax
je 0x40530f
mov eax, dword [esp + 0x1c]
inc edi
cmp edi, eax
jl 0x4051f0
mov eax, dword [esp + 0x1c]
push 1
push ebx
mov dword [esp + eax*4 + 0x3c], esi
push esi
inc eax
push 0xffff0000
mov ecx, ebp
mov dword [esp + 0x2c], eax
call fcn.004044d0
mov edi, eax
test edi, edi
je 0x40530f
mov eax, dword [esp + 0x20]
test eax, eax
jne 0x405246
mov dword [esp + 0x20], esi
mov dword [esp + 0x28], edi
mov eax, dword [esp + 0x18]
test eax, eax
je 0x4052a4
cmp word [eax], 0
jne 0x40525a
mov dword [esp + 0x18], esi
mov eax, esi
test eax, eax
je 0x4052a4
push eax
push esi
call fcn.004af274
add esp, 8
test eax, eax
jne 0x4052a4
mov ecx, dword [esp + 0x10]
or ecx, 0x20
test esi, esi
mov dword [esp + 0x10], ecx
je 0x405284
push esi
call fcn.004aee31
add esp, 4
push eax
push esi
lea ecx, [esp + 0x1c]
call fcn.00402240
mov eax, dword [ebp + 0x5c]
mov eax, dword [eax + 0x1c]
push edi
push 9
push 0x110b
push eax
call dword [sym.imp.USER32.dll_SendMessageW]
cmp dword [esp + 0x10], 1
jne 0x4052e4
test esi, esi
mov dword [esp + 0x10], 0x11
jne 0x4052bb
xor eax, eax
jmp 0x4052c4
push esi
call fcn.004aee31
add esp, 4
push eax
push esi
lea ecx, [esp + 0x1c]
call fcn.00402240
mov eax, dword [ebp + 0x5c]
mov ecx, dword [eax + 0x1c]
push edi
push 9
push 0x110b
push ecx
call dword [sym.imp.USER32.dll_SendMessageW]
push esi
mov ecx, ebp
call fcn.00404970
test eax, eax
je 0x40530f
mov ecx, dword [ebp + 0x5c]
push 0xffff0002
push edi
push 0
push 0
push 0
push 0
push 0
push 0x4ebd38
push 0x23
call fcn.004c2ac6
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x2c]
add eax, 2
cmp eax, ecx
mov dword [esp + 0x24], eax
jl 0x40519c
mov ebx, dword [esp + 0x1c]
mov edx, ecx
jmp 0x4050d6
call fcn.004c22a0
push esi
call fcn.004aee31
add esp, 4
push eax
push esi
lea ecx, [esp + 0x1c]
call fcn.00402240
mov eax, dword [ebp + 0x5c]
mov edx, dword [eax + 0x1c]
push edi
push 9
push 0x110b
push edx
call dword [sym.imp.USER32.dll_SendMessageW]
cmp dword [esp + 0x10], 1
jne 0x40539f
test esi, esi
mov dword [esp + 0x10], 0x11
jne 0x405376
xor eax, eax
jmp 0x40537f
push esi
call fcn.004aee31
add esp, 4
push eax
push esi
lea ecx, [esp + 0x1c]
call fcn.00402240
mov eax, dword [ebp + 0x5c]
mov eax, dword [eax + 0x1c]
push edi
push 9
push 0x110b
push eax
call dword [sym.imp.USER32.dll_SendMessageW]
push esi
mov ecx, ebp
call fcn.00404970
test eax, eax
je 0x4053ca
mov ecx, dword [ebp + 0x5c]
push 0xffff0002
push edi
push 0
push 0
push 0
push 0
push 0
push 0x4ebd38
push 0x23
call fcn.004c2ac6
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
cmp word [esi + eax*2 + 2], 0
lea esi, [esi + eax*2 + 2]
jne 0x405101
mov ebx, dword [esp + 0x10]
test bl, 0x20
jne 0x40542a
mov edi, dword [esp + 0x28]
test edi, edi
je 0x40542a
mov esi, dword [esp + 0x20]
or ebx, 0x20
test esi, esi
jne 0x405401
xor eax, eax
jmp 0x40540a
push esi
call fcn.004aee31
add esp, 4
push eax
push esi
lea ecx, [esp + 0x1c]
call fcn.00402240
mov eax, dword [ebp + 0x5c]
mov ecx, dword [eax + 0x1c]
push edi
push 9
push 0x110b
push ecx
call dword [sym.imp.USER32.dll_SendMessageW]
test ebx, ebx
je 0x405441
mov ebp, dword [ebp + 0x58]
test ebp, ebp
je 0x405441
lea edx, [esp + 0x14]
push edx
mov ecx, ebp
call fcn.0040c2e0
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
mov dword [esp + 0x34c], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40546a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov ecx, dword [esp + 0x344]
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
mov dword fs:[0], ecx
add esp, 0x340
ret 4