Function at 0x40558b
Capabilities:
Delete registry key
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x50c
push esi
push edi
mov dword [ebp - 0x4f4], 0
mov dword [ebp - 0x500], 0
mov dword [ebp - 0x4f8], 0
lea eax, [ebp - 0x4f0]
push eax
call fcn.00405b1f
add esp, 4
mov dword [ebp - 0x4fc], 0
jmp 0x4055de
mov ecx, dword [ebp - 0x4fc]
add ecx, 1
mov dword [ebp - 0x4fc], ecx
cmp dword [ebp - 0x4fc], 0x64
jge 0x405930
lea edx, [ebp - 0x3e8]
push edx
mov eax, dword [ebp - 0x4fc]
push eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.004165b0
add esp, 0xc
lea edi, [ebp - 0x3e8]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
add ecx, 0xffffffff
test ecx, ecx
jne 0x40561d
jmp 0x4055cf
mov edi, 0x4502e0
lea esi, [ebp - 0x3e8]
mov ecx, 6
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
jne 0x405642
mov dword [ebp - 0x4f4], 1
jmp 0x405930
lea eax, [ebp - 0x3e8]
push eax
call fcn.004059e2
add esp, 4
lea ecx, [ebp - 0x4f0]
push ecx
push str._ProgPath_
lea edx, [ebp - 0x3e8]
push edx
call fcn.00416d5a
add esp, 0xc
mov eax, dword [ebp - 0x3e8]
and eax, 0xff
mov dword [ebp - 0x508], eax
mov ecx, dword [ebp - 0x508]
sub ecx, 0x2d
mov dword [ebp - 0x508], ecx
cmp dword [ebp - 0x508], 0x13
ja case.0x4056a7.4
mov eax, dword [ebp - 0x508]
xor edx, edx
mov dl, byte [eax + 0x40597c]
jmp dword [edx*4 + 0x405968]
lea ecx, [ebp - 0x3e7]
mov edi, ecx
lea edx, [ebp - 0x3e8]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov eax, ecx
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [ebp - 0x3e8]
push ecx
call fcn.00405990
add esp, 4
cmp dword [ebp - 0x4f8], 0
je 0x405708
mov edx, dword [ebp - 0x4f8]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [ebp - 0x4f8], 0
cmp dword [ebp - 0x500], 0
je 0x405728
mov eax, dword [ebp - 0x500]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [ebp - 0x500], 0
lea ecx, [ebp - 0x500]
push ecx
lea edx, [ebp - 0x3e8]
push edx
push 0x80000000
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
je 0x405767
lea eax, [ebp - 0x500]
push eax
lea ecx, [ebp - 0x3e8]
push ecx
push 0x80000000
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyA]
test eax, eax
je 0x405767
jmp 0x405930
jmp case.0x4056a7.4
lea edx, [ebp - 0x3e7]
mov edi, edx
lea edx, [ebp - 0x3e8]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov eax, ecx
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [ebp - 0x3e8]
push ecx
call fcn.00405990
add esp, 4
cmp dword [ebp - 0x4f8], 0
je 0x4057c6
mov edx, dword [ebp - 0x4f8]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [ebp - 0x4f8], 0
lea eax, [ebp - 0x4f8]
push eax
lea ecx, [ebp - 0x3e8]
push ecx
mov edx, dword [ebp - 0x500]
push edx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
je 0x405809
lea eax, [ebp - 0x4f8]
push eax
lea ecx, [ebp - 0x3e8]
push ecx
mov edx, dword [ebp - 0x500]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyA]
test eax, eax
je 0x405809
jmp 0x405930
jmp case.0x4056a7.4
lea eax, [ebp - 0x3e7]
mov edi, eax
lea edx, [ebp - 0x3e8]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov eax, ecx
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [ebp - 0x3e8]
push ecx
call fcn.00405990
add esp, 4
cmp dword [ebp - 0x4f8], 0
je 0x405868
mov edx, dword [ebp - 0x4f8]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [ebp - 0x4f8], 0
cmp dword [ebp - 0x500], 0
je 0x405887
lea eax, [ebp - 0x3e8]
push eax
mov ecx, dword [ebp - 0x500]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
jmp 0x40589b
lea edx, [ebp - 0x3e8]
push edx
push 0x80000000
call fcn.00405a29
add esp, 8
jmp case.0x4056a7.4
cmp dword [ebp - 0x4f8], 0
je 0x4058b7
mov eax, dword [ebp - 0x4f8]
mov dword [ebp - 0x50c], eax
jmp 0x4058c3
mov ecx, dword [ebp - 0x500]
mov dword [ebp - 0x50c], ecx
mov edx, dword [ebp - 0x50c]
mov dword [ebp - 0x504], edx
lea eax, [ebp - 0x3e7]
mov edi, eax
lea edx, [ebp - 0x3e8]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov eax, ecx
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [ebp - 0x3e8]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
add ecx, 0xffffffff
push ecx
lea ecx, [ebp - 0x3e8]
push ecx
push 1
push 0
mov edx, dword [ebp - 0x504]
push edx
call dword [sym.imp.ADVAPI32.dll_RegSetValueA]
test eax, eax
je case.0x4056a7.4
jmp 0x405930
jmp 0x4055cf
cmp dword [ebp - 0x4f8], 0
je 0x405946
mov eax, dword [ebp - 0x4f8]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 0x500], 0
je 0x40595c
mov ecx, dword [ebp - 0x500]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [ebp - 0x4f4]
pop edi
pop esi
mov esp, ebp
pop ebp
ret