Function at 0x404340
Capabilities:
Delete registry key
Query or enumerate registry key

Disassembly:
sub esp, 0x23c
mov eax, dword [0x45308c]
xor eax, esp
mov dword [esp + 0x238], eax
mov eax, dword [esp + 0x248]
push ebx
push ebp
mov ebp, dword [esp + 0x248]
push esi
mov esi, dword [esp + 0x250]
push edi
push str.RegDeleteKeyExA
push str.ADVAPI32.DLL
mov dword [esp + 0x2c], esi
mov dword [esp + 0x20], eax
mov dword [esp + 0x18], 0xf003f
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov edi, eax
mov dword [esp + 0x3c], edi
call fcn.004041e0
test eax, eax
je 0x4043ab
mov dword [esp + 0x10], 0xf013f
mov eax, 0x454430
dec eax
xor ebx, ebx
mov cl, byte [eax + 1]
inc eax
cmp cl, bl
jne 0x4043b3
mov ecx, dword [0x441950]
mov dl, byte [0x441954]
mov dword [eax], ecx
mov ecx, dword [esp + 0x10]
mov byte [eax + 4], dl
mov eax, dword [esp + 0x18]
inc dword [eax]
lea eax, [esp + 0x14]
push eax
push ecx
push ebx
push esi
push ebp
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x4045bd
push esi
push ebp
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
cmp edi, ebx
je 0x404403
mov edx, dword [esp + 0x10]
push ebx
push edx
push esi
push ebp
call edi
push ebx
push ebx
lea eax, [esp + 0x48]
push eax
lea ecx, [esp + 0x44]
push ecx
lea edx, [esp + 0x54]
push edx
mov edx, dword [esp + 0x28]
push ebx
lea eax, [esp + 0x44]
push eax
lea ecx, [esp + 0x4c]
push ecx
push ebx
push ebx
push ebx
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryInfoKeyA]
test eax, eax
jne 0x40459f
mov eax, dword [esp + 0x30]
dec eax
cmp eax, ebx
mov dword [esp + 0x1c], eax
jl 0x404594
lea edi, [esp + 0x48]
sub edi, esi
mov dword [esp + 0x28], edi
jmp 0x404464
mov edi, dword [esp + 0x28]
push 0xff
lea eax, [esp + 0x14d]
push ebx
push eax
mov byte [esp + 0x154], bl
call fcn.0042b050
mov edx, dword [esp + 0x28]
mov eax, dword [esp + 0x20]
add esp, 0xc
push 0x100
lea ecx, [esp + 0x14c]
push ecx
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyA]
push 0xff
lea ecx, [esp + 0x4d]
push ebx
push ecx
mov byte [esp + 0x54], bl
call fcn.0042b050
add esp, 0xc
mov eax, esi
mov cl, byte [eax]
mov byte [edi + eax], cl
inc eax
cmp cl, bl
jne 0x4044b7
lea edi, [esp + 0x48]
dec edi
mov al, byte [edi + 1]
inc edi
cmp al, bl
jne 0x4044c6
mov dx, word [0x44194c]
lea eax, [esp + 0x148]
mov word [edi], dx
mov edx, eax
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x4044e1
lea edi, [esp + 0x48]
sub eax, edx
dec edi
nop
mov cl, byte [edi + 1]
inc edi
cmp cl, bl
jne 0x4044f0
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
lea eax, [esp + 0x20]
push eax
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x14]
push ecx
push ebx
lea edx, [esp + 0x54]
push edx
push ebp
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x404575
push ebx
push ebx
lea eax, [esp + 0x48]
push eax
lea ecx, [esp + 0x44]
push ecx
lea edx, [esp + 0x54]
push edx
mov edx, dword [esp + 0x34]
push ebx
lea eax, [esp + 0x44]
push eax
lea ecx, [esp + 0x50]
push ecx
push ebx
push ebx
push ebx
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryInfoKeyA]
test eax, eax
jne 0x404575
cmp dword [esp + 0x34], ebx
je 0x40456a
mov eax, dword [esp + 0x18]
push eax
lea ecx, [esp + 0x4c]
push ecx
push ebp
call fcn.00404340
add esp, 0xc
mov edx, dword [esp + 0x20]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [esp + 0x48]
push eax
push ebp
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
sub dword [esp + 0x1c], 1
mov esi, dword [esp + 0x24]
jns 0x404460
mov edi, dword [esp + 0x3c]
mov ecx, dword [esp + 0x14]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edx, dword [esp + 0x18]
cmp dword [edx], ebx
jne 0x4045bd
push esi
push ebp
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
cmp edi, ebx
je 0x4045bd
mov eax, dword [esp + 0x10]
push ebx
push eax
push esi
push ebp
call edi
mov ecx, dword [esp + 0x248]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
xor eax, eax
call fcn.0042a8de
add esp, 0x23c
ret