Function at 0x405340
Capabilities:
Get disk information

Disassembly:
push 0xffffffffffffffff
push 0x4e790b
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 0x40537c
xor eax, eax
cmp eax, ebx
mov dword [esp + 0x18], ebx
je 0x405399
cmp word [eax], 0x3f
jne 0x405399
add eax, 2
mov dword [esp + 0x18], eax
mov dword [esp + 0x10], 1
push 0x4f008c
lea ecx, [esp + 0x18]
call fcn.004044c0
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 0x4055f0
mov eax, dword [ebp + 0x58]
mov ecx, dword [eax + 0xe4]
test ecx, ecx
lea esi, [esp + 0x1c4]
jne 0x405432
test edx, edx
jg 0x4055b4
cmp word [esp + 0x1c4], 0
je 0x405594
xor edi, edi
test ebx, ebx
jle 0x405462
mov ecx, dword [esp + edi*4 + 0x34]
push ecx
push esi
call fcn.004b3ef4
add esp, 8
test eax, eax
je 0x40557d
inc edi
cmp edi, ebx
jl 0x405447
xor eax, eax
mov ax, word [esi]
and eax, 0xffdf
cmp ax, 0x41
je 0x405478
cmp ax, 0x42
jne 0x405490
movzx edx, ax
sub edx, 0x41
push edx
call fcn.00403760
add esp, 4
cmp eax, 1
je 0x40557d
push 1
push 0
push esi
mov dword [esp + ebx*4 + 0x40], esi
push 0xffff0000
mov ecx, ebp
inc ebx
call fcn.00404820
mov edi, eax
test edi, edi
je 0x40557d
mov eax, dword [esp + 0x20]
test eax, eax
jne 0x4054c0
mov dword [esp + 0x20], esi
mov dword [esp + 0x28], edi
mov eax, dword [esp + 0x18]
test eax, eax
je 0x40551a
cmp word [eax], 0
jne 0x4054d4
mov dword [esp + 0x18], esi
mov eax, esi
test eax, eax
je 0x40551a
push eax
push esi
call fcn.004b3ef4
add esp, 8
test eax, eax
jne 0x40551a
mov ecx, dword [esp + 0x10]
or ecx, 0x20
push esi
mov dword [esp + 0x14], ecx
call fcn.004b3af1
add esp, 4
push eax
push esi
lea ecx, [esp + 0x1c]
call fcn.00402280
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 0x405552
push esi
mov dword [esp + 0x14], 0x11
call fcn.004b3af1
add esp, 4
push eax
push esi
lea ecx, [esp + 0x1c]
call fcn.00402280
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.00404cb0
test eax, eax
je 0x40557d
mov ecx, dword [ebp + 0x5c]
push 0xffff0002
push edi
push 0
push 0
push 0
push 0
push 0
push 0x4efd50
push 0x23
call fcn.004c6c66
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
cmp word [esi + eax*2 + 2], 0
lea esi, [esi + eax*2 + 2]
jne 0x405441
cmp byte [0x519158], 0xff
jne 0x4055a4
mov byte [0x519158], 2
cmp byte [0x519159], 0xff
jne 0x4055b4
mov byte [0x519159], 2
mov ebx, dword [esp + 0x10]
test bl, 0x20
jne 0x4057d1
mov edi, dword [esp + 0x28]
test edi, edi
je 0x4057d1
mov esi, dword [esp + 0x20]
or ebx, 0x20
test esi, esi
jne 0x4057a8
xor eax, eax
jmp 0x4057b1
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x24]
xor ebx, ebx
lea ecx, [ecx]
cmp ecx, ebx
jl 0x4057a3
mov edx, dword [eax + 8]
cmp ecx, edx
jge 0x4057a3
mov eax, dword [eax + 4]
mov esi, dword [eax + ecx*4]
lea edi, [ecx*4]
inc ecx
js 0x4057a3
cmp ecx, edx
jge 0x4057a3
mov ebx, dword [eax + edi + 4]
test ebx, ebx
je 0x40562f
cmp word [ebx], 0
jne 0x40562f
xor ebx, ebx
mov eax, dword [esp + 0x1c]
xor edi, edi
test eax, eax
jle 0x40565f
lea esp, [esp]
mov edx, dword [esp + edi*4 + 0x34]
push edx
push esi
call fcn.004b3ef4
add esp, 8
test eax, eax
je 0x405781
mov eax, dword [esp + 0x1c]
inc edi
cmp edi, eax
jl 0x405640
xor eax, eax
mov ax, word [esi]
and eax, 0xffdf
cmp ax, 0x41
je 0x405675
cmp ax, 0x42
jne 0x40568d
movzx eax, ax
sub eax, 0x41
push eax
call fcn.00403760
add esp, 4
cmp eax, 1
je 0x405781
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.00404820
mov edi, eax
test edi, edi
je 0x405781
mov eax, dword [esp + 0x20]
test eax, eax
jne 0x4056c4
mov dword [esp + 0x20], esi
mov dword [esp + 0x28], edi
mov eax, dword [esp + 0x18]
test eax, eax
je 0x40571e
cmp word [eax], 0
jne 0x4056d8
mov dword [esp + 0x18], esi
mov eax, esi
test eax, eax
je 0x40571e
push eax
push esi
call fcn.004b3ef4
add esp, 8
test eax, eax
jne 0x40571e
mov eax, dword [esp + 0x10]
or eax, 0x20
push esi
mov dword [esp + 0x14], eax
call fcn.004b3af1
add esp, 4
push eax
push esi
lea ecx, [esp + 0x1c]
call fcn.00402280
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]
cmp dword [esp + 0x10], 1
jne 0x405756
push esi
mov dword [esp + 0x14], 0x11
call fcn.004b3af1
add esp, 4
push eax
push esi
lea ecx, [esp + 0x1c]
call fcn.00402280
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]
push esi
mov ecx, ebp
call fcn.00404cb0
test eax, eax
je 0x405781
mov ecx, dword [ebp + 0x5c]
push 0xffff0002
push edi
push 0
push 0
push 0
push 0
push 0
push 0x4efd50
push 0x23
call fcn.004c6c66
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x2c]
add eax, 2
cmp eax, ecx
mov dword [esp + 0x24], eax
jl 0x4055e3
mov ebx, dword [esp + 0x1c]
mov edx, ecx
jmp 0x405416
call fcn.004c6440
push esi
call fcn.004b3af1
add esp, 4
push eax
push esi
lea ecx, [esp + 0x1c]
call fcn.00402280
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]
test ebx, ebx
je 0x4057e8
mov ebp, dword [ebp + 0x58]
test ebp, ebp
je 0x4057e8
lea eax, [esp + 0x14]
push eax
mov ecx, ebp
call fcn.0040ca30
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 0x405811
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