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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x12c
push ebx
push esi
lea eax, [ebp - 0x24]
push edi
xor ebx, ebx
push eax
push 0x20019
push ebx
push str.SOFTWAREPHPPer_Directory_Values
push reloc.WSOCK32.dll_bind
mov dword [ebp - 0x1c], ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x4988e4
push dword [ebp + 8]
call sym.stub.exe__estrdup
mov edi, dword [sym.imp.MSVCRT.dll_strchr]
mov esi, eax
push 0x3a
push esi
mov dword [ebp - 4], esi
call edi
add esp, 0xc
cmp eax, ebx
je 0x49870b
mov cl, byte [esi]
mov esi, eax
mov byte [eax], cl
jmp 0x4987b3
mov al, byte [esi]
cmp al, 0x5c
je 0x4987b3
cmp al, 0x2f
je 0x4987b3
push dword [ebp + 0xc]
lea eax, [ebp - 0x12c]
push 0x104
push eax
call sym.stub.exe_virtual_getcwd
add esp, 0xc
test eax, eax
jne 0x49873e
push esi
jmp 0x4988de
lea eax, [ebp - 0x12c]
push 0x3a
push eax
call edi
mov edi, eax
pop ecx
cmp edi, ebx
pop ecx
jne 0x49875d
mov byte [ebp + 0xb], 0x43
lea edi, [ebp - 0x12c]
jmp 0x498767
mov al, byte [ebp - 0x12c]
mov byte [ebp + 0xb], al
inc edi
mov al, byte [edi]
cmp al, 0x5c
je 0x498766
cmp al, 0x2f
je 0x498766
push edi
call sub.MSVCRT.dll_strlen
mov edx, eax
push esi
mov dword [ebp + 0xc], edx
call sub.MSVCRT.dll_strlen
mov ecx, dword [ebp + 0xc]
lea eax, [ecx + eax + 4]
push eax
call sym.stub.exe__emalloc
push dword [ebp - 4]
mov esi, eax
movsx eax, byte [ebp + 0xb]
push edi
push eax
push str._c_s_s
push esi
call sym.stub.exe_php_sprintf
push dword [ebp - 4]
call sym.stub.exe__efree
add esp, 0x24
mov dword [ebp - 4], esi
lea eax, [ebp - 0x1c]
push eax
push 0x538e5c
push esi
call sym.stub.exe_php_strtok_r
add esp, 0xc
mov dword [ebp + 8], eax
cmp eax, ebx
je 0x4988d2
cmp eax, dword [ebp + 8]
mov dword [ebp - 0xc], ebx
mov dword [ebp - 0x10], ebx
mov dword [ebp - 8], ebx
mov dword [ebp + 0xc], ebx
jbe 0x4987e5
mov byte [eax - 1], 0x5c
lea eax, [ebp - 0x14]
push eax
push 0x20019
push ebx
push dword [ebp + 8]
push dword [ebp - 0x24]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x4988d2
push ebx
lea eax, [ebp - 8]
push ebx
push eax
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0xc]
push eax
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push dword [ebp - 0x14]
call dword [sym.imp.ADVAPI32.dll_RegQueryInfoKeyA]
test eax, eax
jne 0x4988b2
mov eax, dword [ebp - 0x10]
inc eax
push eax
call sym.stub.exe__emalloc
push dword [ebp - 8]
mov esi, eax
call sym.stub.exe__emalloc
cmp dword [ebp - 0xc], ebx
pop ecx
pop ecx
mov edi, eax
jbe 0x4988a4
mov eax, dword [ebp - 0x10]
inc eax
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 8]
mov dword [ebp - 0x20], eax
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x18]
push edi
push eax
lea eax, [ebp - 0x28]
push ebx
push eax
push esi
push dword [ebp + 0xc]
push dword [ebp - 0x14]
call dword [sym.imp.ADVAPI32.dll_RegEnumValueA]
cmp dword [ebp - 0x18], 1
je 0x498879
cmp dword [ebp - 0x18], 2
jne 0x498899
mov eax, dword [ebp - 0x20]
push 4
mov ecx, eax
dec eax
neg ecx
sbb ecx, ecx
push 4
and ecx, eax
mov eax, dword [ebp - 0x28]
push ecx
inc eax
push edi
push eax
push esi
call sym.stub.exe_zend_alter_ini_entry
add esp, 0x18
inc dword [ebp + 0xc]
mov eax, dword [ebp + 0xc]
cmp eax, dword [ebp - 0xc]
jb 0x498845
push esi
call sym.stub.exe__efree
push edi
call sym.stub.exe__efree
pop ecx
pop ecx
push dword [ebp - 0x14]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [ebp - 0x1c]
push eax
push 0x538e5c
push ebx
call sym.stub.exe_php_strtok_r
add esp, 0xc
jmp 0x4987c8
push dword [ebp - 0x24]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push dword [ebp - 4]
call sym.stub.exe__efree
pop ecx
pop edi
pop esi
pop ebx
leave
ret