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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
mov eax, dword [0x44a7f0]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 0xc]
push esi
mov eax, ecx
cmp dword [eax], 0
mov ecx, dword [ebp + 8]
push edi
mov edi, dword [ebp + 0x10]
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x30], ebx
mov dword [ebp - 0x2c], edi
jne 0x41a609
lea ecx, [ebp - 0x11]
call fcn.0041a41e
mov al, byte [eax]
mov byte [ebp - 0x12], al
push 0x44429c
lea eax, [ebp - 0x12]
push eax
call fcn.00430488
xor esi, esi
lea edx, [ebp - 0x24]
push edx
push esi
lea edx, [ebp - 0x20]
push edx
push esi
push ecx
push dword [eax]
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x24], esi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
je 0x41a640
push eax
lea ecx, [ebp - 0x2c]
call fcn.0040ec48
mov eax, dword [eax]
mov dword [ebp - 0x18], eax
push 0x442bd0
lea eax, [ebp - 0x18]
jmp 0x41a603
mov eax, dword [ebp - 0x20]
test eax, eax
je 0x41a7ca
cmp eax, 2
jbe 0x41a659
cmp eax, 4
jne 0x41a7ca
push dword [ebp - 0x24]
call fcn.004311a5
mov esi, eax
pop ecx
test esi, esi
jne 0x41a67c
lea ecx, [ebp - 0x11]
call fcn.0040ec22
mov al, byte [eax]
mov byte [ebp - 0x12], al
push 0x442b98
jmp 0x41a600
lea eax, [ebp - 0x24]
push eax
push esi
lea eax, [ebp - 0x20]
push eax
mov eax, dword [ebp - 0x1c]
push 0
push dword [ebp - 0x18]
push dword [eax]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
je 0x41a6b4
push eax
lea ecx, [ebp - 0x2c]
call fcn.0040ec48
mov eax, dword [eax]
mov dword [ebp - 0x1c], eax
push 0x442bd0
lea eax, [ebp - 0x1c]
jmp 0x41a603
mov eax, dword [ebp - 0x20]
dec eax
je 0x41a7a4
dec eax
je 0x41a714
dec eax
dec eax
je 0x41a6dc
lea ecx, [ebp - 0x25]
call fcn.0040fd5d
mov al, byte [eax]
mov byte [ebp - 0x12], al
push 0x4431a8
jmp 0x41a600
push dword [esi]
lea eax, [ebp - 0x10]
push 0x401754
push 0xffffffffffffffff
push eax
call fcn.0040ecbc
lea edx, [ebp - 0x10]
add esp, 0x10
lea ecx, [edx + 1]
mov al, byte [edx]
inc edx
test al, al
jne 0x41a6f7
sub edx, ecx
push edx
lea eax, [ebp - 0x10]
push eax
mov ecx, ebx
call fcn.0040d5f7
and dword [edi], 0
jmp 0x41a7b2
push 0
push 0
push esi
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
mov ebx, eax
test ebx, ebx
jne 0x41a73b
push esi
call fcn.00430334
pop ecx
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea ecx, [ebp - 0x38]
jmp 0x41a69d
push ebx
call fcn.004311a5
mov edi, eax
pop ecx
test edi, edi
jne 0x41a762
lea ecx, [ebp - 0x13]
call fcn.0040ec22
mov al, byte [eax]
mov byte [ebp - 0x11], al
push 0x442b98
lea eax, [ebp - 0x11]
jmp 0x41a603
push ebx
push edi
push esi
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
test eax, eax
je 0x41a78e
cmp eax, ebx
ja 0x41a78e
mov ecx, dword [ebp - 0x30]
push edi
call fcn.0040d66c
mov eax, dword [ebp - 0x2c]
push edi
mov dword [eax], 2
call fcn.00430334
pop ecx
jmp 0x41a7b2
push esi
call fcn.00430334
pop ecx
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea ecx, [ebp - 0x34]
jmp 0x41a62c
push esi
mov ecx, ebx
call fcn.0040d66c
mov dword [edi], 1
push esi
call fcn.00430334
pop ecx
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0043047a
leave
ret 0xc
lea ecx, [ebp - 0x13]
call fcn.0040fd5d
mov al, byte [eax]
mov byte [ebp - 0x11], al
push 0x4431a8
jmp 0x41a75a