Function at 0x4053c0
Capabilities:
Query or enumerate registry key
Query or enumerate registry value
Set registry value

Disassembly:
sub esp, 0x5b4
push ebx
push ebp
push esi
push edi
mov ecx, 0x13
mov esi, str.SystemCurrentControlSetControlClass4D36E96D_E325_11CE_BFC1_08002BE10318
lea edi, [esp + 0x74]
mov dx, word [0x410a40]
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [0x410a3c]
mov eax, dword [str.DriverDesc]
mov ebx, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov dword [esp + 0x24], ecx
lea ecx, [esp + 0x14]
mov word [esp + 0x28], dx
push ecx
push 0x20019
lea edx, [esp + 0x7c]
mov dword [esp + 0x28], eax
mov al, byte [0x410a42]
push 0
push edx
push 0x80000002
movsw word es:[edi], word [esi]
mov byte [esp + 0x3e], al
mov dword [esp + 0x2c], 0x40
call ebx
test eax, eax
je 0x405451
push 0
push str.Debug
push str.AddOldAttachedtoKey_failed
push 0
call fcn.00404fa0
add esp, 0x10
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x5b4
ret
lea eax, [esp + 0x2c]
lea ecx, [esp + 0x18]
push eax
mov eax, dword [esp + 0x18]
push 0
push 0
push 0
lea edx, [esp + 0x44]
push ecx
push edx
push 0
push eax
mov ebp, 1
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExA]
test eax, eax
jne 0x4055cb
or ecx, 0xffffffff
lea edi, [esp + 0x74]
xor eax, eax
lea edx, [esp + 0x1c4]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
shr ecx, 2
mov edi, edx
lea edx, [esp + 0x1c4]
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, 0x410350
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
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 ecx, edx
lea edx, [esp + 0x1c4]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x34]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
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 ecx, edx
lea eax, [esp + 0x10]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
push 0xf003f
lea ecx, [esp + 0x1cc]
push 0
push ecx
push 0x80000002
call ebx
test eax, eax
jne 0x40559f
lea edx, [esp + 0x1c]
lea eax, [esp + 0xc4]
push edx
mov edx, dword [esp + 0x14]
push eax
push 0
lea ecx, [esp + 0x2c]
push 0
push ecx
push edx
mov dword [esp + 0x34], 0x100
mov dword [esp + 0x30], 0x40
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x405594
mov esi, 0x4169c0
lea eax, [esp + 0xc4]
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x40558b
test cl, cl
je 0x405587
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x40558b
add eax, 2
add esi, 2
test cl, cl
jne 0x405567
xor eax, eax
jmp 0x405590
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x4055cb
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea ecx, [esp + 0x2c]
lea edx, [esp + 0x18]
push ecx
push 0
push 0
push 0
lea ecx, [esp + 0x44]
mov eax, ebp
push edx
mov edx, dword [esp + 0x28]
push ecx
push eax
push edx
inc ebp
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExA]
test eax, eax
je 0x405480
mov esi, 0x4169c0
lea eax, [esp + 0xc4]
mov dl, byte [eax]
mov bl, byte [esi]
mov cl, dl
cmp dl, bl
jne 0x4055ff
test cl, cl
je 0x4055fb
mov dl, byte [eax + 1]
mov bl, byte [esi + 1]
mov cl, dl
cmp dl, bl
jne 0x4055ff
add eax, 2
add esi, 2
test cl, cl
jne 0x4055d7
xor eax, eax
jmp 0x405604
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x40563f
push 0
push str.Error:_2
push str.AddOldAttachedtoKey_failed
push 0
call fcn.00404fa0
mov eax, dword [esp + 0x20]
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
add esp, 0x10
push eax
call esi
mov ecx, dword [esp + 0x14]
push ecx
call esi
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x5b4
ret
push 0x416380
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov edx, dword [esp + 0x10]
inc eax
push eax
push 0x416380
push 1
push 0
push str.AttachedTo
push edx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
test eax, eax
je 0x4056a0
push 0
push str.Error:_3
push str.AddOldAttachedtoKey_failed
push 0
call fcn.00404fa0
mov eax, dword [esp + 0x20]
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
add esp, 0x10
push eax
call esi
mov ecx, dword [esp + 0x14]
push ecx
call esi
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x5b4
ret
mov edx, dword [esp + 0x10]
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push edx
call esi
mov eax, dword [esp + 0x14]
push eax
call esi
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x5b4
ret