Function at 0x404a40
Capabilities:
Query or enumerate registry value

Disassembly:
push 0xffffffffffffffff
push 0x48adf6
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x134
mov ecx, dword [esp + 0x14c]
mov edx, dword [esp + 0x148]
push ebx
push esi
lea eax, [esp + 0x14]
push edi
xor ebx, ebx
push eax
push 1
push ebx
push ecx
push edx
mov dword [esp + 0x28], ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x404add
mov esi, dword [esp + 0x150]
mov al, byte [esp + 0xf]
push ebx
mov ecx, esi
mov byte [esi], al
call fcn.00408210
push 0x4b15bc
call fcn.0045a25d
add esp, 4
mov edi, eax
mov ecx, esi
push 1
push edi
call fcn.004091a0
test al, al
je 0x404d13
mov ecx, dword [esi + 4]
push edi
push 0x4b15bc
push ecx
call fcn.00403090
mov edx, dword [esi + 4]
mov dword [esi + 8], edi
add esp, 0xc
mov word [edx + edi*2], bx
jmp 0x404d13
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x3d]
mov byte [esp + 0x3c], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [esp + 0x10]
lea ecx, [esp + 0x3c]
push eax
mov eax, dword [esp + 0x160]
lea edx, [esp + 0x18]
push ecx
mov ecx, dword [esp + 0x20]
push edx
push ebx
push eax
push ecx
mov dword [esp + 0x28], 0x104
mov dword [esp + 0x2c], 1
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
cmp eax, ebx
je 0x404b7f
mov esi, dword [esp + 0x150]
mov dl, byte [esp + 0xf]
push ebx
mov ecx, esi
mov byte [esi], dl
call fcn.00408210
push 0x4b15bc
call fcn.0045a25d
add esp, 4
mov edi, eax
mov ecx, esi
push 1
push edi
call fcn.004091a0
test al, al
je 0x404d13
mov eax, dword [esi + 4]
push edi
push 0x4b15bc
push eax
call fcn.00403090
mov ecx, dword [esi + 4]
mov dword [esi + 8], edi
add esp, 0xc
mov word [ecx + edi*2], bx
jmp 0x404d13
lea edi, [esp + 0x3c]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp ecx, ebx
jg 0x404be8
mov esi, dword [esp + 0x150]
mov dl, byte [esp + 0xf]
push ebx
mov ecx, esi
mov byte [esi], dl
call fcn.00408210
push 0x4b15bc
call fcn.0045a25d
add esp, 4
mov edi, eax
mov ecx, esi
push 1
push edi
call fcn.004091a0
test al, al
je 0x404d13
mov eax, dword [esi + 4]
push edi
push 0x4b15bc
push eax
call fcn.00403090
mov ecx, dword [esi + 4]
mov dword [esi + 8], edi
add esp, 0xc
mov word [ecx + edi*2], bx
jmp 0x404d13
mov edx, dword [esp + 0x10]
push ebp
inc edx
push edx
call fcn.004801e7
mov ebp, eax
mov eax, dword [esp + 0x18]
mov edi, ebp
lea esi, [esp + 0x44]
lea ecx, [eax + 1]
xor eax, eax
mov edx, ecx
add esp, 4
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov ecx, dword [esp + 0x14]
mov edi, ebp
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x1c]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edi, ebp
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x30]
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push ebp
push edx
call fcn.00405060
add esp, 0xc
mov al, byte [esp + 0x30]
push ebx
lea ecx, [esp + 0x24]
mov dword [esp + 0x150], ebx
mov byte [esp + 0x24], al
call fcn.00408210
mov ecx, dword [0x4919cc]
lea edx, [esp + 0x30]
push ecx
push ebx
push edx
lea ecx, [esp + 0x2c]
call fcn.00407ee0
push ebp
mov byte [esp + 0x150], 1
call fcn.00480210
mov esi, dword [esp + 0x158]
mov al, byte [esp + 0x24]
add esp, 4
mov ecx, esi
mov byte [esi], al
push ebx
call fcn.00408210
mov ecx, dword [0x4919cc]
lea edx, [esp + 0x20]
push ecx
push ebx
push edx
mov ecx, esi
call fcn.00407ee0
mov eax, dword [esp + 0x24]
pop ebp
cmp eax, ebx
je 0x404ce1
mov cl, byte [eax - 1]
cmp cl, bl
je 0x404cd5
cmp cl, 0xff
je 0x404cd5
dec cl
mov byte [eax - 1], cl
jmp 0x404ce1
add eax, 0xfffffffe
push eax
call fcn.00480210
add esp, 4
mov ecx, dword [esp + 0x30]
mov dword [esp + 0x20], ebx
cmp ecx, ebx
mov dword [esp + 0x24], ebx
mov dword [esp + 0x28], ebx
je 0x404d13
mov al, byte [ecx - 1]
cmp al, bl
je 0x404d07
cmp al, 0xff
je 0x404d07
dec al
mov byte [ecx - 1], al
jmp 0x404d13
add ecx, 0xfffffffe
push ecx
call fcn.00480210
add esp, 4
mov ecx, dword [esp + 0x140]
mov eax, esi
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
add esp, 0x140
ret