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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x43c
mov eax, dword [0x5bb70c3c]
mov ecx, dword [ebp + 0xc]
push ebx
push esi
push edi
push ecx
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push eax
push 0x5ba4c800
mov esi, 0x104
lea eax, [ebp - 0x414]
push esi
xor edi, edi
push eax
mov dword [ebp - 0x42c], edi
mov dword [ebp - 0x424], 1
call sub.SHLWAPI.dll_wnsprintfA
mov ebx, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
add esp, 0x14
lea eax, [ebp - 0x428]
push eax
push 0x20019
push edi
lea eax, [ebp - 0x414]
push eax
push reloc.OLEAUT32.dll_SysReAllocString
call ebx
test eax, eax
jne 0x5ba72bc8
push edi
push edi
push edi
push edi
push edi
push edi
lea eax, [ebp - 0x41c]
push eax
push edi
push edi
push edi
push edi
push dword [ebp - 0x428]
call dword [sym.imp.ADVAPI32.dll_RegQueryInfoKeyA]
test eax, eax
jne 0x5ba72bbc
add dword [ebp - 0x41c], 0x14
push dword [ebp - 0x41c]
lea eax, [ebp - 0x420]
push eax
call fcn.5ba561af
test eax, eax
je 0x5ba72bbc
mov eax, dword [ebp - 0x41c]
mov dword [ebp - 0x418], eax
push edi
push edi
push edi
push edi
lea eax, [ebp - 0x418]
push eax
push dword [ebp - 0x420]
push dword [ebp - 0x42c]
push dword [ebp - 0x428]
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExA]
inc dword [ebp - 0x42c]
test eax, eax
jne 0x5ba72bab
push dword [ebp - 0x41c]
mov dword [ebp - 0x424], edi
push 0x5ba4c970
push dword [ebp - 0x420]
call sub.SHLWAPI.dll_StrCatBuffA
lea eax, [ebp - 0x434]
push eax
push 0x20019
push edi
push dword [ebp - 0x420]
push SysReAllocString
call ebx
test eax, eax
jne 0x5ba72b93
lea eax, [ebp - 0x430]
push eax
push 0x20019
push edi
push dword [ebp - 0x420]
push dword [ebp - 0x428]
call ebx
test eax, eax
jne 0x5ba72b87
lea eax, [ebp - 0x418]
push eax
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x438]
push eax
push edi
push edi
push dword [ebp - 0x434]
mov dword [ebp - 0x418], esi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x5ba72b7b
lea eax, [ebp - 0x418]
push eax
lea eax, [ebp - 0x108]
push eax
lea eax, [ebp - 0x43c]
push eax
push edi
push edi
push dword [ebp - 0x430]
mov dword [ebp - 0x418], esi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x5ba72b7b
cmp dword [ebp - 0x43c], 2
jne 0x5ba72b26
push esi
lea eax, [ebp - 0x310]
push eax
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
push esi
lea eax, [ebp - 0x310]
push eax
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
cmp dword [ebp - 0x438], 2
jne 0x5ba72b59
push esi
lea eax, [ebp - 0x310]
push eax
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
push esi
lea eax, [ebp - 0x310]
push eax
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
jne 0x5ba72b7b
mov dword [ebp - 0x424], 1
push dword [ebp - 0x430]
call dword [entry0]
push dword [ebp - 0x434]
call dword [entry0]
cmp dword [ebp - 0x424], edi
mov eax, dword [ebp - 0x41c]
mov dword [ebp - 0x418], eax
jne 0x5ba729ff
mov eax, dword [0x5bb73714]
push dword [ebp - 0x420]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x14]
push dword [ebp - 0x428]
call dword [entry0]
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x424]
pop edi
pop esi
pop ebx
call fcn.5bb3f314
leave
ret 8