Function at 0x403170
Capabilities:
Query or enumerate registry value

Disassembly:
sub esp, 0x248
mov dl, byte [0x47f68c]
push ebx
push esi
push edi
mov ecx, 0x18
xor eax, eax
lea edi, [esp + 0x81]
mov byte [esp + 0x80], dl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 0x11
xor eax, eax
lea edi, [esp + 0xe5]
mov byte [esp + 0xe4], dl
rep stosd dword es:[edi], eax
xor ecx, ecx
mov byte [esp + 0x20], dl
mov cl, byte [0x4db355]
xor ebx, ebx
stosb byte es:[edi], al
mov edx, dword [ecx*4 + 0x48be20]
xor eax, eax
mov dword [esp + 0x21], eax
cmp edx, 0xffffffff
mov dword [esp + 0x25], eax
mov dword [esp + 0x38], ebx
mov byte [esp + 0x29], al
mov dword [esp + 0x30], ebx
mov dword [esp + 0x2c], 0xa
mov dword [esp + 0x10], 1
jne 0x4031fd
pop edi
pop esi
mov al, 1
pop ebx
add esp, 0x248
ret
mov esi, dword [esp + 0x25c]
mov ecx, 0x10
mov eax, esi
mov byte [eax], 0
add eax, 0x214
dec ecx
jne 0x40320b
lea eax, [esp + 0x38]
push ebx
push eax
lea ecx, [esp + 0x134]
push 0x126
push ecx
push ebx
push ebx
push 0x86196220
push edx
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
cmp al, 1
je 0x403259
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x1f
jne 0x40324d
mov byte [0x4db352], 1
pop edi
pop esi
mov al, 2
pop ebx
add esp, 0x248
ret
mov dl, byte [esp + 0x14f]
lea eax, [esp + 0x3c]
lea ecx, [esp + 0x1c]
push eax
push ecx
push ebx
push 0xf003f
push 1
push ebx
push ebx
inc dl
push str.EnumSCSI
push 0x80000002
mov byte [esi + 0x2141], dl
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
je 0x4032a3
pop edi
pop esi
mov byte [0x4db352], 1
mov al, 3
pop ebx
add esp, 0x248
ret
push ebp
mov byte [esp + 0x10], 0
jmp 0x4032b2
mov esi, dword [esp + 0x260]
mov ebx, dword [esp + 0x10]
lea edi, [esp + 0x134]
and ebx, 0xff
or ecx, 0xffffffff
mov edx, ebx
xor eax, eax
shl edx, 5
add edx, ebx
lea edx, [ebx + edx*4]
shl edx, 2
repne scasb al, byte es:[edi]
not ecx
lea ebp, [edx + esi]
lea esi, [esp + 0x84]
sub edi, ecx
mov dword [esp + 0x1c], esi
mov eax, ecx
mov esi, edi
mov edi, dword [esp + 0x1c]
mov byte [ebp + 6], 0
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x84]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
test ecx, ecx
mov dword [esp + 0x1c], ecx
jle 0x403331
cmp byte [esp + eax + 0x84], 0x20
jne 0x40332c
mov byte [esp + eax + 0x84], 0x5f
inc eax
cmp eax, ecx
jl 0x40331a
add ecx, 0xfffffffe
lea edi, [ebp + 0xc]
mov eax, ecx
lea esi, [esp + 0x134]
shr ecx, 2
mov dword [esp + 0x38], edi
mov byte [esp + 0x6c], 0
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov eax, dword [esp + 0x260]
and ecx, 3
mov byte [esp + 0x54], 0
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x1c]
add edx, ecx
mov byte [edx + eax + 0xa], 0
mov ecx, dword [esp + 0x134]
mov edx, dword [esp + 0x138]
mov eax, dword [esp + 0x13c]
mov dword [esp + 0x64], ecx
mov ecx, dword [esp + 0x140]
mov dword [esp + 0x68], edx
mov edx, dword [esp + 0x144]
mov dword [esp + 0x44], eax
mov eax, dword [esp + 0x148]
mov dword [esp + 0x48], ecx
mov dword [esp + 0x4c], edx
lea ecx, [esp + 0x44]
lea edx, [esp + 0x64]
mov dword [esp + 0x50], eax
push ecx
push edx
lea eax, [ebp + 0x110]
push str._s__s
push eax
call fcn.0040661c
mov eax, dword [esp + 0x162]
add esp, 0x10
cmp al, 0xff
push ebx
je 0x403409
mov ecx, dword [esp + 0x136]
mov edx, dword [esp + 0x134]
and eax, 0xff
and ecx, 0xffff
push eax
and edx, 0xffff
push ecx
push edx
lea eax, [esp + 0xf8]
push str.ICUSBDISK0000USBVID__XPID__XINST__X_02d
push eax
jmp 0x403439
mov edx, dword [esp + 0x136]
mov eax, dword [esp + 0x134]
lea ecx, [esp + 0x159]
and edx, 0xffff
push ecx
and eax, 0xffff
push edx
push eax
lea ecx, [esp + 0xf8]
push str.ICUSBDISK0000USBVID__XPID__X_s_02d
push ecx
call fcn.0040661c
lea edi, [esp + 0x100]
or ecx, 0xffffffff
xor eax, eax
add esp, 0x18
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x84]
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea eax, [esp + 0x40]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
mov eax, dword [esp + 0x24]
lea ecx, [esp + 0x1c]
xor ebx, ebx
push ecx
push ebx
push 0xf003f
push 1
push ebx
lea edx, [esp + 0x9c]
push ebx
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
je 0x4034aa
mov dword [esp + 0x14], ebx
jmp 0x403595
lea ecx, [esp + 0x30]
lea edx, [esp + 0x24]
push ecx
mov ecx, dword [esp + 0x1c]
lea eax, [esp + 0x38]
push edx
push eax
push ebx
push str.CurrentDriveLetterAssignment
push ecx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
je 0x4034e2
mov edx, dword [esp + 0x18]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [esp + 0x14], ebx
jmp 0x403595
lea edi, [esp + 0x24]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, 0x47c5c0
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edx, ecx
mov edi, ebp
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov al, byte [esp + 0x10]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x260]
mov byte [ebp + 5], al
mov al, byte [ecx + 0x2140]
test al, al
je 0x40355d
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 0x25c]
push ebx
push edx
push eax
call fcn.00405200
add esp, 0xc
jmp 0x40356d
mov ecx, dword [esp + 0x25c]
push ecx
call fcn.00404ce0
add esp, 4
fst dword [ebp + 8]
mov eax, dword [esp + 0x38]
push ebp
sub esp, 8
fstp qword [esp]
push eax
push str._s:__.2f_M___s_
push eax
call fcn.0040661c
mov edx, dword [esp + 0x30]
add esp, 0x18
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov al, byte [esp + 0x10]
mov cl, byte [esp + 0x153]
inc al
cmp al, cl
mov byte [esp + 0x10], al
jbe 0x4032ab
mov eax, dword [esp + 0x20]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [esp + 0x14]
pop ebp
cmp eax, 1
jne 0x4035cf
pop edi
pop esi
xor al, al
pop ebx
add esp, 0x248
ret
pop edi
pop esi
mov byte [0x4db352], 1
mov al, 4
pop ebx
add esp, 0x248
ret