Function at 0x500500
Capabilities:
Query environment variable
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
sub esp, 0x3c
push ecx
push edi
lea edi, [esp + 8]
mov eax, 0xcccccccc
mov ecx, 0xf
rep stosd dword es:[edi], eax
pop edi
pop ecx
mov esi, dword [ebp + 8]
mov dword [ebp - 0x44], ecx
mov dword [ebp - 0xc], 0
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x20], 0
call fcn.0056d3b0
cmp al, 0
je 0x5005ef
lea eax, [ebp - 0x14]
push eax
mov ecx, dword [ebp + 0xc]
call fcn.0058a430
cmp dword [ebp - 0x14], 0
je 0x500583
mov edx, dword [ebp - 0x14]
mov ebx, dword [0x63df38]
mov edx, dword [edx + 0x10]
cmp ebx, edx
jne 0x500579
mov edx, dword [ebp - 0x14]
mov edx, dword [edx + 0xc]
cmp edx, 0x80000000
sbb edx, 0xffffffff
sar edx, 1
jmp 0x500588
mov edx, dword [ebp - 0x14]
mov edx, dword [edx + 0xc]
shr edx, 1
jmp 0x500588
mov edx, 0
mov edx, edx
add edx, 1
lea edx, [edx + edx]
push edx
call fcn.0058bbb0
pop ecx
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x14], 0
je 0x5005a8
mov edx, dword [ebp - 0x14]
mov eax, dword [edx + 0xc]
jmp 0x5005ad
mov eax, 0
add eax, 2
push eax
lea ecx, [ebp - 0x14]
call fcn.0058a750
push eax
push dword [ebp - 0x20]
call fcn.0040e030
add esp, 0xc
lea eax, [ebp - 0x10]
push eax
push 0
lea eax, [ebp - 0xc]
push eax
push 0
push dword [ebp - 0x20]
mov eax, dword [ebp - 0x44]
push dword [eax]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
cmp dword [ebp - 0x14], 0
je 0x50060f
mov ecx, dword [ebp - 0x14]
call fcn.00589d70
jmp 0x50060f
lea eax, [ebp - 0x10]
push eax
push 0
lea eax, [ebp - 0xc]
push eax
push 0
mov ecx, dword [ebp + 0xc]
call fcn.0058a690
push eax
mov eax, dword [ebp - 0x44]
push dword [eax]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
cmp dword [ebp - 0xc], 1
je 0x500621
cmp dword [ebp - 0xc], 2
je 0x500621
cmp dword [ebp - 0xc], 7
jne 0x500627
cmp dword [ebp - 0x10], 0
jne 0x500672
cmp dword [ebp - 0x20], 0
je 0x500636
push dword [ebp - 0x20]
call fcn.0058bbc0
pop ecx
mov dword [esi], 0
push 0x5fb074
call fcn.0040d340
pop ecx
push eax
push 0x5fb074
mov ecx, esi
call fcn.00589f70
cmp dword [esi], 0
je 0x500664
mov ebx, dword [esi]
mov edx, dword [0x63df30]
mov dword [ebx + 0x10], edx
mov edx, esi
mov eax, dword [ebp + 8]
lea esp, [ebp - 8]
pop esi
pop ebx
pop ebp
ret 0xc
call fcn.0056d3b0
cmp al, 0
je 0x5007a5
cmp dword [ebp - 0xc], 7
jne 0x5007a5
mov eax, dword [ebp - 0x10]
push eax
call fcn.0058bbb0
pop ecx
mov dword [ebp - 0x24], eax
lea eax, [ebp - 0x10]
push eax
push dword [ebp - 0x24]
lea eax, [ebp - 0xc]
push eax
push 0
push dword [ebp - 0x20]
mov eax, dword [ebp - 0x44]
push dword [eax]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov dword [ebp - 0x28], eax
push dword [ebp - 0x20]
call fcn.0058bbc0
pop ecx
cmp dword [ebp - 0x28], 0
je 0x5006e3
push 0
push str.ERROR_SUCCESS__err
push 0x1ac
push str.Registry.cpp
push 4
push 0x83
call fcn.004a4f70
add esp, 0x18
mov dword [ebp - 0x18], 0
mov eax, dword [ebp - 0x10]
add eax, 0xfffffffc
push eax
push dword [ebp - 0x24]
lea ecx, [ebp - 0x18]
call fcn.00589f70
cmp dword [ebp - 0x18], 0
je 0x50070e
mov ebx, dword [ebp - 0x18]
mov edx, dword [0x63df38]
mov dword [ebx + 0x10], edx
push dword [ebp - 0x24]
call fcn.0058bbc0
pop ecx
cmp byte [ebp + 0x10], 0
je 0x500782
cmp dword [ebp - 0xc], 2
jne 0x500782
push 0
push 0
lea ecx, [ebp - 0x18]
call fcn.0058a750
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
mov dword [ebp - 0x2c], eax
mov edx, dword [ebp - 0x2c]
lea edx, [edx + edx]
push edx
call fcn.0058bbb0
pop ecx
mov dword [ebp - 0x30], eax
push dword [ebp - 0x2c]
push dword [ebp - 0x30]
lea ecx, [ebp - 0x18]
call fcn.0058a750
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
mov dword [ebp - 0x34], eax
cmp dword [ebp - 0x34], 0
jle 0x500779
mov eax, dword [ebp - 0x34]
add eax, 0xffffffff
push eax
push dword [ebp - 0x30]
lea ecx, [ebp - 0x18]
call fcn.0058a000
push dword [ebp - 0x30]
call fcn.0058bbc0
pop ecx
push esi
lea ecx, [ebp - 0x18]
call fcn.0058a3a0
cmp dword [ebp - 0x18], 0
je 0x500799
mov ecx, dword [ebp - 0x18]
call fcn.00589d70
mov eax, dword [ebp + 8]
lea esp, [ebp - 8]
pop esi
pop ebx
pop ebp
ret 0xc
mov eax, dword [ebp - 0x10]
push eax
call fcn.0058bbb0
pop ecx
mov dword [ebp - 0x38], eax
lea eax, [ebp - 0x10]
push eax
push dword [ebp - 0x38]
lea eax, [ebp - 0xc]
push eax
push 0
mov ecx, dword [ebp + 0xc]
call fcn.0058a690
push eax
mov eax, dword [ebp - 0x44]
push dword [eax]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov dword [ebp - 0x1c], 0
mov eax, dword [ebp - 0x10]
add eax, 0xffffffff
push eax
push dword [ebp - 0x38]
lea ecx, [ebp - 0x1c]
call fcn.00589f70
push dword [ebp - 0x38]
call fcn.0058bbc0
pop ecx
cmp byte [ebp + 0x10], 0
je 0x50085d
cmp dword [ebp - 0xc], 2
jne 0x50085d
push 0
push 0
lea ecx, [ebp - 0x1c]
call fcn.0058a720
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp - 0x3c]
push eax
call fcn.0058bbb0
pop ecx
mov dword [ebp - 0x38], eax
push dword [ebp - 0x3c]
push dword [ebp - 0x38]
lea ecx, [ebp - 0x1c]
call fcn.0058a720
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
mov dword [ebp - 0x40], eax
cmp dword [ebp - 0x40], 0
jle 0x500854
mov eax, dword [ebp - 0x40]
add eax, 0xffffffff
push eax
push dword [ebp - 0x38]
lea ecx, [ebp - 0x1c]
call fcn.00589f70
push dword [ebp - 0x38]
call fcn.0058bbc0
pop ecx
call fcn.00546dd0
cmp dword [ebp - 0x1c], 0
je 0x50086e
mov edx, dword [ebp - 0x1c]
mov dword [edx + 0x10], eax
mov edx, dword [ebp - 0x1c]
mov dword [esi], edx
cmp dword [esi], 0
je 0x50087c
mov edx, dword [esi]
inc dword [edx]
cmp dword [ebp - 0x1c], 0
je 0x50088a
mov ecx, dword [ebp - 0x1c]
call fcn.00589d70
mov eax, dword [ebp + 8]
lea esp, [ebp - 8]
pop esi
pop ebx
pop ebp
ret 0xc