Function at 0x405720
Capabilities:
Query or enumerate registry value

Disassembly:
push 0xffffffffffffffff
push 0x437169
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x248
push esi
push edi
mov ecx, 0x80
xor eax, eax
lea edi, [esp + 0x50]
xor esi, esi
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0x26c]
mov dword [esp + 0x258], esi
cmp eax, esi
mov dword [esp + 0x10], esi
mov dword [esp + 0x44], 1
jbe 0x4057c8
mov eax, dword [esp + 0x268]
cmp eax, esi
jne 0x40577a
mov eax, 0x439998
mov edx, dword [esp + 0x260]
lea ecx, [esp + 0x10]
push ecx
push 0x20019
push esi
push eax
push edx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
cmp eax, esi
je 0x4057d3
push 1
lea ecx, [esp + 0x268]
mov dword [esp + 0x25c], 0xffffffff
call fcn.00402d20
pop edi
pop esi
mov ecx, dword [esp + 0x248]
mov dword fs:[0], ecx
add esp, 0x254
ret
mov eax, dword [esp + 0x260]
mov dword [esp + 0x10], eax
push ebx
push ebp
push 0x7fff
call fcn.00420f95
mov ecx, dword [esp + 0x280]
mov ebp, eax
add esp, 4
mov dword [ebp], esi
mov esi, dword [ecx + 8]
mov edi, dword [ecx + 4]
cmp esi, esi
mov ebx, esi
je 0x405813
push ebx
mov ecx, edi
call fcn.00406440
add ebx, 0x2c
add edi, 0x2c
cmp ebx, esi
jne 0x4057fa
mov ecx, dword [esp + 0x27c]
mov eax, dword [ecx + 8]
push eax
push edi
call fcn.00406140
mov ecx, dword [esp + 0x27c]
mov dl, byte [esp + 0x17]
xor esi, esi
mov byte [esp + 0x20], dl
mov dword [ecx + 8], edi
push esi
lea ecx, [esp + 0x24]
call fcn.00402d20
lea eax, [esp + 0x17]
lea ecx, [esp + 0x3c]
push eax
mov byte [esp + 0x264], 1
call fcn.00405b40
mov byte [esp + 0x260], 2
mov dword [esp + 0x1c], esi
lea ecx, [esp + 0x10]
lea edx, [esp + 0x4c]
push ecx
push ebp
push edx
mov edx, dword [esp + 0x28]
lea eax, [esp + 0x60]
push esi
lea ecx, [esp + 0x68]
push eax
mov eax, dword [esp + 0x2c]
push ecx
push edx
push eax
mov dword [esp + 0x74], 0x200
mov dword [esp + 0x30], 0x7fff
call dword [sym.imp.ADVAPI32.dll_RegEnumValueA]
cmp eax, 0x103
je 0x405a6e
lea edi, [esp + 0x58]
or ecx, 0xffffffff
xor eax, eax
push 1
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov ebx, ecx
lea ecx, [esp + 0x24]
push ebx
call fcn.004031d0
test al, al
je 0x4058e2
mov edi, dword [esp + 0x24]
mov ecx, ebx
mov edx, ecx
lea esi, [esp + 0x58]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [esp + 0x24]
mov dword [esp + 0x28], ebx
mov byte [eax + ebx], 0
mov eax, dword [esp + 0x4c]
cmp eax, 1
mov dword [esp + 0x30], eax
jne 0x405902
mov eax, dword [esp + 0x10]
test eax, eax
jbe 0x405985
mov byte [eax + ebp - 1], 0
jmp 0x40593c
cmp eax, 2
je 0x4058ef
cmp eax, 7
jne 0x4059b3
mov ecx, dword [esp + 0x10]
cmp ecx, 1
jbe 0x405985
xor eax, eax
test ecx, ecx
jbe 0x40592e
cmp byte [eax + ebp], 0
jne 0x405929
mov byte [eax + ebp], 0xd
inc eax
cmp eax, ecx
jb 0x40591f
mov byte [ecx + ebp - 1], 0
mov ecx, dword [esp + 0x10]
mov byte [ecx + ebp - 2], 0
mov edi, ebp
or ecx, 0xffffffff
xor eax, eax
push 1
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov ebx, ecx
lea ecx, [esp + 0x40]
push ebx
call fcn.004031d0
test al, al
je 0x405a4b
mov ecx, ebx
mov esi, ebp
mov edi, dword [esp + 0x40]
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [esp + 0x40]
mov dword [esp + 0x44], ebx
mov byte [eax + ebx], 0
jmp 0x405a4b
mov edi, 0x449870
or ecx, 0xffffffff
xor eax, eax
push 1
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov ebx, ecx
lea ecx, [esp + 0x40]
push ebx
call fcn.004031d0
test al, al
je 0x405a4b
mov ecx, ebx
mov esi, 0x449870
jmp 0x405962
cmp eax, 3
je 0x4059d5
cmp eax, 8
je 0x4059d5
cmp eax, 9
je 0x4059d5
cmp eax, 0xa
je 0x4059d5
cmp eax, 4
jne 0x405a4b
mov ecx, dword [ebp]
mov dword [esp + 0x38], ecx
jmp 0x405a4b
mov eax, dword [esp + 0x10]
xor esi, esi
cmp eax, esi
jbe 0x405a47
lea edx, [eax + eax*2 + 0xa]
mov dword [esp + 0x50], esi
push edx
call fcn.00420f95
mov edi, eax
mov eax, dword [esp + 0x14]
mov dword [esp + 0x38], edi
add esp, 4
lea ecx, [eax + eax*2 + 0xa]
xor eax, eax
mov edx, ecx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
cmp dword [esp + 0x10], esi
jbe 0x405a4b
xor eax, eax
lea ecx, [esp + 0x50]
mov al, byte [esi + ebp]
push eax
push str._02X
push ecx
call fcn.0040e6fe
mov eax, dword [esp + 0x40]
add esp, 0xc
lea edx, [esp + 0x50]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
mov eax, dword [esp + 0x10]
inc esi
cmp esi, eax
jb 0x405a14
jmp 0x405a4b
mov dword [esp + 0x34], esi
mov eax, dword [esp + 0x28]
test eax, eax
jbe 0x405a6a
mov ecx, dword [esp + 0x27c]
lea edx, [esp + 0x20]
push edx
push 1
mov eax, dword [ecx + 8]
push eax
call fcn.00405e10
xor eax, eax
xor esi, esi
mov edx, dword [esp + 0x1c]
inc edx
cmp eax, esi
mov dword [esp + 0x1c], edx
je 0x40585d
cmp dword [esp + 0x268], esi
je 0x405a93
mov eax, dword [esp + 0x18]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push ebp
call fcn.00420fbe
add esp, 4
push 1
lea ecx, [esp + 0x40]
mov byte [esp + 0x264], 3
call fcn.00402d20
mov ecx, dword [esp + 0x24]
pop ebp
cmp ecx, esi
pop ebx
je 0x405ad5
mov al, byte [ecx - 1]
test al, al
je 0x405acb
cmp al, 0xff
je 0x405acb
dec al
mov byte [ecx - 1], al
jmp 0x405ad5
dec ecx
push ecx
call fcn.00420fbe
add esp, 4
mov ecx, dword [esp + 0x268]
mov dword [esp + 0x1c], esi
cmp ecx, esi
mov dword [esp + 0x20], esi
mov dword [esp + 0x24], esi
je 0x405b1d
mov al, byte [ecx - 1]
test al, al
je 0x405b13
cmp al, 0xff
je 0x405b13
dec al
pop edi
mov byte [ecx - 1], al
pop esi
mov ecx, dword [esp + 0x248]
mov dword fs:[0], ecx
add esp, 0x254
ret
dec ecx
push ecx
call fcn.00420fbe
add esp, 4
mov ecx, dword [esp + 0x250]
pop edi
pop esi
mov dword fs:[0], ecx
add esp, 0x254
ret