Function at 0x4055c0
Capabilities:
Delete registry key
Query or enumerate registry key
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x33c
mov eax, dword [0x5b0050]
xor eax, ebp
mov dword [ebp - 4], eax
mov dword [ebp - 0x324], ecx
mov dword [ebp - 0x330], 0
mov dword [ebp - 0x328], 0
xor eax, eax
mov word [ebp - 0x104], ax
push 0xfe
push 0
lea ecx, [ebp - 0x102]
push ecx
call fcn.005341e0
add esp, 0xc
mov dword [ebp - 0x32c], 0
mov dword [ebp - 0x33c], 0
mov dword [ebp - 0x334], pe_nt_image_headers32
mov dword [ebp - 0x31c], 0
mov dword [ebp - 0x314], 0
mov dword [ebp - 0x338], 0x58f388
mov edx, dword [ebp - 0x324]
mov eax, dword [edx + 0x1a14]
mov dword [ebp - 0x310], eax
mov ecx, dword [ebp - 0x324]
mov edx, dword [ecx + 0x1a14]
mov dword [ebp - 0x318], edx
cmp dword [ebp - 0x310], 0
je 0x4056a4
mov eax, dword [ebp - 0x310]
mov dword [ebp - 0x318], eax
mov ecx, dword [ebp - 0x310]
mov edx, dword [ecx + 0x400]
mov dword [ebp - 0x310], edx
mov eax, dword [ebp - 0x318]
push eax
call fcn.00532474
add esp, 4
jmp 0x40566c
mov ecx, dword [ebp - 0x324]
mov dword [ecx + 0x1a14], 0
lea edx, [ebp - 0x328]
push edx
push 0x20019
push 0
mov eax, dword [ebp - 0x338]
push eax
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x405a1b
push 0
push 0
push 0
push 0
lea ecx, [ebp - 0x334]
push ecx
lea edx, [ebp - 0x104]
push edx
mov eax, dword [ebp - 0x32c]
push eax
mov ecx, dword [ebp - 0x328]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
test eax, eax
jne 0x405a1b
mov dword [ebp - 0x320], 0
mov edx, dword [ebp - 0x338]
push edx
lea eax, [ebp - 0x30c]
push eax
call dword [sym.imp.SHLWAPI.dll_StrCpyW]
push 0x58f384
lea ecx, [ebp - 0x30c]
push ecx
call dword [sym.imp.SHLWAPI.dll_StrCatW]
lea edx, [ebp - 0x104]
push edx
lea eax, [ebp - 0x30c]
push eax
call dword [sym.imp.SHLWAPI.dll_StrCatW]
lea ecx, [ebp - 0x320]
push ecx
push 0x20019
push 0
lea edx, [ebp - 0x30c]
push edx
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x4059fd
mov dword [ebp - 0x31c], 4
mov dword [ebp - 0x314], 4
lea eax, [ebp - 0x31c]
push eax
lea ecx, [ebp - 0x33c]
push ecx
lea edx, [ebp - 0x314]
push edx
push 0
push str.MAKEID_P1_INDEX
mov eax, dword [ebp - 0x320]
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x4059f0
push 0x58f420
lea ecx, [ebp - 0x104]
push ecx
call dword [sym.imp.SHLWAPI.dll_StrStrW]
test eax, eax
je 0x4057ec
lea edx, [ebp - 0x30c]
push edx
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.SHLWAPI.dll_SHDeleteKeyW]
jmp 0x4059f0
mov dword [ebp - 0x330], 1
mov eax, dword [ebp - 0x324]
cmp dword [eax + 0x1a14], 0
jne 0x40583f
push 0x404
call fcn.0053307a
add esp, 4
mov dword [ebp - 0x310], eax
mov ecx, dword [ebp - 0x310]
mov dword [ecx + 0x400], 0
mov edx, dword [ebp - 0x324]
mov eax, dword [ebp - 0x310]
mov dword [edx + 0x1a14], eax
jmp 0x4058c1
mov ecx, dword [ebp - 0x324]
mov edx, dword [ecx + 0x1a14]
mov dword [ebp - 0x310], edx
cmp dword [ebp - 0x310], 0
je 0x40587a
mov eax, dword [ebp - 0x310]
mov dword [ebp - 0x318], eax
mov ecx, dword [ebp - 0x310]
mov edx, dword [ecx + 0x400]
mov dword [ebp - 0x310], edx
jmp 0x405851
push 0x404
call fcn.0053307a
add esp, 4
mov ecx, dword [ebp - 0x318]
mov dword [ecx + 0x400], eax
mov edx, dword [ebp - 0x318]
mov eax, dword [edx + 0x400]
mov dword [ebp - 0x318], eax
mov ecx, dword [ebp - 0x318]
mov dword [ecx + 0x400], 0
mov edx, dword [ebp - 0x318]
mov dword [ebp - 0x310], edx
lea eax, [ebp - 0x104]
push eax
mov ecx, dword [ebp - 0x310]
push ecx
call dword [sym.imp.SHLWAPI.dll_StrCpyW]
push pe_nt_image_headers32
push 0
mov edx, dword [ebp - 0x310]
add edx, 0x100
push edx
call fcn.005341e0
add esp, 0xc
mov dword [ebp - 0x31c], pe_nt_image_headers32
mov dword [ebp - 0x314], 1
lea eax, [ebp - 0x31c]
push eax
mov ecx, dword [ebp - 0x310]
add ecx, 0x100
push ecx
lea edx, [ebp - 0x314]
push edx
push 0
push 0x58f424
mov eax, dword [ebp - 0x320]
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push pe_nt_image_headers32
push 0
mov ecx, dword [ebp - 0x310]
add ecx, 0x200
push ecx
call fcn.005341e0
add esp, 0xc
mov dword [ebp - 0x31c], pe_nt_image_headers32
mov dword [ebp - 0x314], 1
lea edx, [ebp - 0x31c]
push edx
mov eax, dword [ebp - 0x310]
add eax, 0x200
push eax
lea ecx, [ebp - 0x314]
push ecx
push 0
push str.Port
mov edx, dword [ebp - 0x320]
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push pe_nt_image_headers32
push 0
mov eax, dword [ebp - 0x310]
add eax, 0x300
push eax
call fcn.005341e0
add esp, 0xc
mov dword [ebp - 0x31c], pe_nt_image_headers32
mov dword [ebp - 0x314], 1
lea ecx, [ebp - 0x31c]
push ecx
mov edx, dword [ebp - 0x310]
add edx, 0x300
push edx
lea eax, [ebp - 0x314]
push eax
push 0
push str.MAKEID_P1_MONITOR
mov ecx, dword [ebp - 0x320]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov edx, dword [ebp - 0x320]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [ebp - 0x32c]
add eax, 1
mov dword [ebp - 0x32c], eax
mov dword [ebp - 0x334], pe_nt_image_headers32
jmp 0x4056dc
cmp dword [ebp - 0x328], 0
je 0x405a31
mov ecx, dword [ebp - 0x328]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [ebp - 0x330]
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00531c35
mov esp, ebp
pop ebp
ret