Function at 0x407540
Capabilities:
Query or enumerate registry key
Query or enumerate registry value

Disassembly:
sub esp, 0xb60
mov dl, byte [0x41989c]
push ebp
push esi
push edi
mov ecx, pe_nt_image_headers32
xor eax, eax
lea edi, [esp + 0x245]
mov byte [esp + 0x244], dl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, pe_nt_image_headers32
xor eax, eax
lea edi, [esp + 0x41]
mov byte [esp + 0x40], dl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov eax, dword [esp + 0xb70]
lea ecx, [esp + 0x348]
push ecx
push str.3A0F67E2769ECBF343363A6DECA4B567B8377AD0609859CCD91832FD76FFE9F12F30A8BBD46ED1436AA1288E0E49EA4F92C42340157049FEA2633B0005F00D681010C9C6F0A59EA8A22D55AFD477E0DA80FDCCA6651E734DB231FBE3F0D4068E
mov dword [esp + 0x24], 0x104
mov dword [esp + 0x20], 0
mov dword [esp + 0x1c], 0x100
mov byte [eax], 0
call fcn.00408390
add esp, 8
lea edx, [esp + 0xc]
lea eax, [esp + 0x348]
push edx
push 1
push 0
push eax
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x40777e
lea ecx, [esp + 0x38]
lea edx, [esp + 0x30]
push ecx
lea eax, [esp + 0x28]
push edx
lea ecx, [esp + 0x30]
push eax
lea edx, [esp + 0x1c]
push ecx
lea eax, [esp + 0x3c]
push edx
lea ecx, [esp + 0x48]
push eax
lea edx, [esp + 0x30]
push ecx
push edx
mov edx, dword [esp + 0x2c]
lea eax, [esp + 0x3c]
push 0
lea ecx, [esp + 0x268]
push eax
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryInfoKeyA]
mov eax, dword [esp + 0x10]
test eax, eax
je 0x407773
xor edi, edi
test eax, eax
jbe 0x407773
mov ebp, dword [sym.imp.ADVAPI32.dll_RegEnumValueA]
push 0
lea eax, [esp + 0x24]
push 0
push eax
mov eax, dword [esp + 0x18]
lea ecx, [esp + 0x20]
push 0
lea edx, [esp + 0x154]
push ecx
push edx
push edi
push eax
mov dword [esp + 0x34], 0x100
mov byte [esp + 0x164], 0
call ebp
test eax, eax
jne 0x407766
cmp dword [esp + 0x20], 1
jne 0x407766
lea ecx, [esp + 0x348]
push ecx
push str.3A0F67E2769ECBF343363A6DECA4B567B8377AD0609859CCD91832FD76FFE9F12F30A8BBD46ED1436AA1288E0E49EA4F92C42340157049FEA2633B0005F00D681010C9C6F0A59EA8A22D55AFD477E0DA80FDCCA6651E734DB231FBE3F0D4068E
call fcn.00408390
lea edx, [esp + 0x48]
push 0x104
push edx
lea eax, [esp + 0x154]
push 0x41989c
lea ecx, [esp + 0x35c]
push eax
push ecx
push 0x80000001
call fcn.004085b0
lea edx, [esp + 0x164]
lea eax, [esp + 0x60]
push edx
push eax
call fcn.00401000
lea ecx, [esp + 0x370]
push ecx
push str.38F1296EEF590BE67081
call fcn.00408390
add esp, 0x30
lea esi, [esp + 0x348]
lea eax, [esp + 0x144]
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x40770d
test cl, cl
je 0x407709
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x40770d
add eax, 2
add esi, 2
test cl, cl
jne 0x4076e9
xor eax, eax
jmp 0x407712
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x40778a
lea eax, [esp + 0x348]
push eax
push str.3BCF6965E4195D1337E4E07AF1E128D6656F
call fcn.00408390
add esp, 8
lea esi, [esp + 0x348]
lea eax, [esp + 0x144]
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x40775d
test cl, cl
je 0x407759
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x40775d
add eax, 2
add esi, 2
test cl, cl
jne 0x407739
xor eax, eax
jmp 0x407762
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x40778a
mov eax, dword [esp + 0x10]
inc edi
cmp edi, eax
jb 0x407636
mov eax, dword [esp + 0xc]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
pop esi
xor eax, eax
pop ebp
add esp, 0xb60
ret
mov eax, dword [esp + 0xc]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea edi, [esp + 0x40]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, 1
mov edx, ecx
mov esi, edi
mov edi, dword [esp + 0xb70]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
pop edi
pop esi
pop ebp
add esp, 0xb60
ret