Function at 0x406c20
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
lea ebp, [esp - 0x108]
sub esp, 0x108
push 0xffffffffffffffff
push 0x41f870
mov eax, dword fs:[0]
push eax
sub esp, 0x20
mov eax, dword [0x43f7ac]
xor eax, ebp
mov dword [ebp + 0x104], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov esi, ecx
mov dword [ebp - 0x14], esi
mov ebx, dword [ebp + 0x110]
mov edi, dword [ebp + 0x114]
mov dword [ebp - 0x2c], edi
mov eax, dword [ebp + 0x11c]
mov dword [ebp - 0x20], eax
mov ecx, dword [ebp + 0x128]
mov dword [ebp - 0x28], ecx
xor ecx, ecx
mov dword [ebp - 0x1c], ecx
cmp dword [esi + 0x11c], ecx
jne 0x406c96
xor eax, eax
jmp 0x406e93
mov dword [ebp - 4], ecx
mov dword [ebp - 0x18], ecx
cmp dword [ebp + 0x120], ecx
jne 0x406ca7
mov dword [ebp - 0x20], ecx
mov eax, dword [esi + 0x124]
cmp eax, 2
jne 0x406d95
mov dword [ebp - 0x24], ecx
lea ecx, [esi + 4]
lea edx, [ebp]
nop
mov al, byte [ecx]
mov byte [edx], al
add ecx, 1
add edx, 1
test al, al
jne 0x406cc0
test ebx, ebx
je 0x406d13
lea edx, [ebp]
push edx
call fcn.0040e2c0
add esp, 4
mov eax, ebx
mov edx, ebx
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x406ce2
sub eax, edx
lea edi, [ebp]
add edi, 0xffffffff
mov cl, byte [edi + 1]
add edi, 1
test cl, cl
jne 0x406cf3
mov ecx, eax
mov esi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [ebp - 0x14]
mov edi, dword [ebp - 0x2c]
lea eax, [ebp - 0x24]
push eax
push 0x20019
push 0
lea ecx, [ebp]
push ecx
push SysReAllocStringLen
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x406e67
mov edx, dword [ebp + 0x118]
mov dword [ebp - 0x14], edx
cmp dword [ebp + 0x124], eax
je 0x406d4d
mov dword [ebp - 0x14], 3
lea eax, [ebp + 0x120]
push eax
mov ecx, dword [ebp - 0x20]
push ecx
lea edx, [ebp - 0x14]
push edx
push 0
push edi
mov eax, dword [ebp - 0x24]
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x406d86
mov eax, dword [ebp + 0x120]
mov dword [ebp - 0x18], eax
mov ecx, dword [ebp - 0x28]
test ecx, ecx
je 0x406d7f
mov dword [ecx], eax
mov dword [ebp - 0x1c], 1
mov ecx, dword [ebp - 0x24]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x406e67
cmp eax, 1
jne 0x406e89
mov ecx, esi
call fcn.00405480
cmp dword [esi + 0x12c], 0
je 0x406e4e
mov dword [ebp - 0x18], 1
mov ecx, edi
lea edx, [ebp]
mov edi, edi
mov al, byte [ecx]
mov byte [edx], al
add ecx, 1
add edx, 1
test al, al
jne 0x406dc0
mov eax, dword [esi + 0x10c]
mov esi, eax
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x406dd6
sub eax, esi
lea edi, [ebp]
add edi, 0xffffffff
mov cl, byte [edi + 1]
add edi, 1
test cl, cl
jne 0x406de7
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [ebp + 0x124]
push edi
push 0
lea edx, [ebp - 0x18]
push edx
mov eax, dword [ebp - 0x20]
push eax
mov esi, dword [ebp + 0x118]
push esi
lea ecx, [ebp]
push ecx
push ebx
mov ecx, dword [ebp - 0x14]
call fcn.00406590
cmp dword [ebp - 0x18], 0
je 0x406e4b
mov eax, dword [ebp + 0x120]
mov edx, dword [ebp - 0x18]
cmp edx, eax
jbe 0x406eba
test eax, eax
jne 0x406e4b
cmp dword [ebp - 0x20], eax
jne 0x406e4b
mov dword [ebp - 0x1c], 1
mov esi, dword [ebp - 0x14]
mov ecx, esi
call fcn.004057d0
cmp dword [ebp - 0x1c], 0
je 0x406e89
mov eax, dword [ebp - 0x28]
test eax, eax
je 0x406e67
mov ecx, dword [ebp - 0x18]
mov dword [eax], ecx
cmp dword [ebp - 0x1c], 0
je 0x406e89
mov eax, dword [ebp - 0x20]
test eax, eax
je 0x406e89
cmp dword [ebp + 0x124], 0
je 0x406e89
mov edx, dword [ebp - 0x18]
push edx
push eax
mov ecx, esi
call fcn.00405000
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x104]
xor ecx, ebp
call fcn.0040fe67
add ebp, 0x108
mov esp, ebp
pop ebp
ret 0x1c
mov ecx, dword [ebp - 0x20]
test ecx, ecx
je 0x406e44
cmp esi, 1
jne 0x406ecd
cmp eax, edx
jae 0x406ecd
mov dword [ebp - 0x18], eax
push edi
push 1
lea edx, [ebp - 0x18]
push edx
push ecx
push esi
mov eax, dword [ebp - 0x2c]
push eax
push ebx
mov ecx, dword [ebp - 0x14]
call fcn.00406590
mov dword [ebp - 0x1c], eax
test eax, eax
jne 0x406e4b
mov dword [ebp - 0x18], eax
jmp 0x406e4b