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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
mov eax, dword [0x44a7b0]
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 0x41a93c
lea ecx, [ebp - 0x11]
call fcn.0041a751
mov al, byte [eax]
mov byte [ebp - 0x12], al
push 0x444468
lea eax, [ebp - 0x12]
push eax
call fcn.00430608
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 0x41a973
push eax
lea ecx, [ebp - 0x2c]
call fcn.0040ec8b
mov eax, dword [eax]
mov dword [ebp - 0x18], eax
push 0x442d98
lea eax, [ebp - 0x18]
jmp 0x41a936
mov eax, dword [ebp - 0x20]
test eax, eax
je 0x41aafd
cmp eax, 2
jbe 0x41a98c
cmp eax, 4
jne 0x41aafd
push dword [ebp - 0x24]
call fcn.00431325
mov esi, eax
pop ecx
test esi, esi
jne 0x41a9af
lea ecx, [ebp - 0x11]
call fcn.0040ec65
mov al, byte [eax]
mov byte [ebp - 0x12], al
push 0x442d60
jmp 0x41a933
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 0x41a9e7
push eax
lea ecx, [ebp - 0x2c]
call fcn.0040ec8b
mov eax, dword [eax]
mov dword [ebp - 0x1c], eax
push 0x442d98
lea eax, [ebp - 0x1c]
jmp 0x41a936
mov eax, dword [ebp - 0x20]
dec eax
je 0x41aad7
dec eax
je 0x41aa47
dec eax
dec eax
je 0x41aa0f
lea ecx, [ebp - 0x25]
call fcn.0040fda0
mov al, byte [eax]
mov byte [ebp - 0x12], al
push 0x443368
jmp 0x41a933
push dword [esi]
lea eax, [ebp - 0x10]
push 0x40179c
push 0xffffffffffffffff
push eax
call fcn.0040ecff
lea edx, [ebp - 0x10]
add esp, 0x10
lea ecx, [edx + 1]
mov al, byte [edx]
inc edx
test al, al
jne 0x41aa2a
sub edx, ecx
push edx
lea eax, [ebp - 0x10]
push eax
mov ecx, ebx
call fcn.0040d728
and dword [edi], 0
jmp 0x41aae5
push 0
push 0
push esi
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
mov ebx, eax
test ebx, ebx
jne 0x41aa6e
push esi
call fcn.004304b4
pop ecx
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea ecx, [ebp - 0x38]
jmp 0x41a9d0
push ebx
call fcn.00431325
mov edi, eax
pop ecx
test edi, edi
jne 0x41aa95
lea ecx, [ebp - 0x13]
call fcn.0040ec65
mov al, byte [eax]
mov byte [ebp - 0x11], al
push 0x442d60
lea eax, [ebp - 0x11]
jmp 0x41a936
push ebx
push edi
push esi
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
test eax, eax
je 0x41aac1
cmp eax, ebx
ja 0x41aac1
mov ecx, dword [ebp - 0x30]
push edi
call fcn.0040d79d
mov eax, dword [ebp - 0x2c]
push edi
mov dword [eax], 2
call fcn.004304b4
pop ecx
jmp 0x41aae5
push esi
call fcn.004304b4
pop ecx
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea ecx, [ebp - 0x34]
jmp 0x41a95f
push esi
mov ecx, ebx
call fcn.0040d79d
mov dword [edi], 1
push esi
call fcn.004304b4
pop ecx
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004305fa
leave
ret 0xc
lea ecx, [ebp - 0x13]
call fcn.0040fda0
mov al, byte [eax]
mov byte [ebp - 0x11], al
push 0x443368
jmp 0x41aa8d