Function at 0x413690
Capabilities:
Query or enumerate registry key

Disassembly:
sub esp, 0x224
push ebx
push esi
mov dword [esp + 0x20], ecx
push edi
mov edi, 0x5e26ec
or ecx, 0xffffffff
xor eax, eax
mov ebx, dword [esp + 0x234]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edx, ecx
mov edi, 0x5fd218
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 eax, dword [0x5e26a4]
mov ecx, edx
and ecx, 3
inc eax
mov dword [0x5e26a4], eax
lea eax, [esp + 0xc]
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x238]
push eax
push 0xf003f
push 0
push ecx
push ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x4138c1
push eax
push eax
lea edx, [esp + 0x30]
lea eax, [esp + 0x28]
push edx
lea ecx, [esp + 0x20]
push eax
push ecx
mov ecx, dword [esp + 0x20]
lea edx, [esp + 0x2c]
push 0
lea eax, [esp + 0x44]
push edx
push eax
push 0
push 0
push 0
push ecx
call dword [sym.imp.ADVAPI32.dll_RegQueryInfoKeyA]
test eax, eax
jne 0x4138a9
mov edx, dword [esp + 0x2c]
push ebp
lea ebp, [edx - 1]
test ebp, ebp
jl 0x41389d
mov al, byte [0x5fd02c]
mov ecx, 0x3f
mov byte [esp + 0x134], al
xor eax, eax
lea edi, [esp + 0x135]
mov edx, dword [esp + 0x10]
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x134]
push pe_nt_image_headers32
stosw word es:[edi], ax
push ecx
push ebp
push edx
stosb byte es:[edi], al
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyA]
mov al, byte [0x5fd02c]
mov ecx, 0x3f
mov byte [esp + 0x34], al
xor eax, eax
lea edi, [esp + 0x35]
lea edx, [esp + 0x34]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov edi, dword [esp + 0x23c]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x34]
shr ecx, 2
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, 0x5e2158
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 + 0x34]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x134]
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 + 0x14]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
push 0xf003f
lea ecx, [esp + 0x3c]
push 0
push ecx
push ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x41388a
push eax
push eax
lea edx, [esp + 0x34]
lea eax, [esp + 0x2c]
push edx
lea ecx, [esp + 0x24]
push eax
push ecx
mov ecx, dword [esp + 0x28]
lea edx, [esp + 0x30]
push 0
lea eax, [esp + 0x38]
push edx
push eax
push 0
push 0
push 0
push ecx
call dword [sym.imp.ADVAPI32.dll_RegQueryInfoKeyA]
test eax, eax
jne 0x41388a
mov eax, dword [esp + 0x20]
test eax, eax
je 0x41387f
mov ecx, dword [esp + 0x28]
lea edx, [esp + 0x34]
push edx
push ebx
call fcn.00413690
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea ecx, [esp + 0x34]
push ecx
push ebx
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
dec ebp
jns 0x413745
mov edx, dword [esp + 0x10]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop ebp
mov eax, dword [0x5e26a4]
test eax, eax
jne 0x4138c1
mov eax, dword [esp + 0x238]
push eax
push ebx
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x224
ret 8