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

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffbd0
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x430], ebx
mov dword [ebp - 0x42c], ebx
mov dword [ebp - 0x420], ebx
mov dword [ebp - 8], ecx
mov dword [ebp - 4], edx
mov esi, eax
mov ebx, dword [ebp + 8]
mov eax, dword [ebp - 4]
call fcn.00404a50
mov eax, dword [ebp - 8]
call fcn.00404a50
xor eax, eax
push ebp
push 0x491505
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, ebx
call fcn.004045a0
mov dl, 1
mov eax, dword [0x4326d4]
call fcn.004327d4
mov dword [ebp - 0x18], eax
xor eax, eax
push ebp
push 0x4914c8
push dword fs:[eax]
mov dword fs:[eax], esp
mov edx, esi
mov eax, dword [ebp - 0x18]
call fcn.00432874
mov eax, dword [ebp - 0x18]
mov dword [eax + 0x18], 0x20019
xor ecx, ecx
mov edx, dword [ebp - 4]
mov eax, dword [ebp - 0x18]
call fcn.004328dc
test al, al
je 0x4914b2
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 0x18]
call fcn.004331ec
test al, al
je 0x4914b2
lea eax, [ebp - 0xc]
push eax
push 0
lea eax, [ebp - 0x10]
push eax
push 0
mov eax, dword [ebp - 8]
call fcn.00404a60
push eax
mov eax, dword [ebp - 0x18]
mov eax, dword [eax + 4]
push eax
call sub.advapi32.dll_RegQueryValueExA_1
mov eax, dword [ebp - 0x10]
dec eax
je 0x49124b
dec eax
je 0x49125d
add eax, 0xfffffffe
sub eax, 2
jb 0x4912db
dec eax
je 0x4912f2
jmp 0x49135e
mov ecx, ebx
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 0x18]
call fcn.00432ff0
jmp 0x4914aa
mov ecx, ebx
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 0x18]
call fcn.00432ff0
mov eax, dword [ebp - 0xc]
test eax, eax
jns 0x491276
call fcn.00403790
push eax
push 0
mov eax, dword [ebx]
call fcn.00404a60
push eax
call sub.kernel32.dll_ExpandEnvironmentStringsA
test eax, eax
jns 0x49128f
call fcn.00403790
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jle 0x4914aa
mov eax, dword [ebp - 0xc]
test eax, eax
jns 0x4912a8
call fcn.00403790
push eax
lea eax, [ebp - 0x419]
push eax
mov eax, dword [ebx]
call fcn.00404a60
push eax
call sub.kernel32.dll_ExpandEnvironmentStringsA
test eax, eax
jns 0x4912c6
call fcn.00403790
mov dword [ebp - 0xc], eax
mov eax, ebx
lea edx, [ebp - 0x419]
call fcn.00404798
jmp 0x4914aa
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 0x18]
call fcn.0043307c
mov edx, ebx
call fcn.00408e5c
jmp 0x4914aa
mov eax, ebx
call fcn.004045a0
cmp dword [ebp - 0xc], 0xffffffff
jle 0x4914aa
mov eax, dword [ebp - 0xc]
push eax
lea ecx, [ebp - 0x419]
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 0x18]
call fcn.004330ac
mov dl, 1
mov eax, dword [0x4174f0]
call fcn.00403820
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x14]
push eax
mov ecx, dword [ebp - 0xc]
test ecx, ecx
jns 0x491337
call fcn.00403790
lea eax, [ebp - 0x419]
mov edx, 0x400
call fcn.004915c4
mov edx, ebx
mov eax, dword [ebp - 0x14]
mov ecx, dword [eax]
call dword [ecx + 0x1c]
mov eax, dword [ebp - 0x14]
call fcn.00403850
jmp 0x4914aa
mov eax, ebx
call fcn.004045a0
cmp dword [ebp - 0xc], 0xffffffff
jle 0x4914aa
mov eax, dword [ebp - 0xc]
push eax
lea ecx, [ebp - 0x419]
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 0x18]
call fcn.004330ac
cmp byte [ebp + 0xc], 0
je 0x491441
xor esi, esi
cmp esi, 0x400
jbe 0x49139d
call fcn.00403790
cmp byte [ebp + esi - 0x419], 0
je 0x4913f2
lea eax, [ebp - 0x420]
push eax
cmp esi, 0x400
jbe 0x4913bb
call fcn.00403790
xor eax, eax
mov al, byte [ebp + esi - 0x419]
mov dword [ebp - 0x428], eax
mov byte [ebp - 0x424], 0
lea edx, [ebp - 0x428]
xor ecx, ecx
mov eax, 0x491520
call fcn.00409d64
mov edx, dword [ebp - 0x420]
mov eax, ebx
call fcn.00404868
jmp 0x49142c
lea eax, [ebp - 0x42c]
push eax
mov eax, dword [ebx]
call fcn.00404860
mov edx, eax
mov eax, dword [ebx]
mov ecx, 1
call fcn.00404ac0
mov eax, dword [ebp - 0x42c]
mov edx, 0x491530
call fcn.004049ac
je 0x49142c
mov eax, ebx
mov edx, 0x49153c
call fcn.00404868
mov eax, dword [ebx]
call fcn.00404860
mov edx, eax
sub edx, 2
mov eax, ebx
call fcn.00404bec
jmp 0x4914aa
mov edi, dword [ebp - 0xc]
dec edi
test edi, edi
jl 0x491499
inc edi
xor esi, esi
lea eax, [ebp - 0x430]
push eax
cmp esi, 0x400
jbe 0x491460
call fcn.00403790
xor eax, eax
mov al, byte [ebp + esi - 0x419]
mov dword [ebp - 0x428], eax
mov byte [ebp - 0x424], 0
lea edx, [ebp - 0x428]
xor ecx, ecx
mov eax, 0x491548
call fcn.00409d64
mov edx, dword [ebp - 0x430]
mov eax, ebx
call fcn.00404868
inc esi
dec edi
jne 0x49144c
mov eax, dword [ebx]
call fcn.00404860
mov edx, eax
dec edx
mov eax, ebx
call fcn.00404bec
mov eax, dword [ebp - 0x18]
call fcn.00432844
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4914cf
mov eax, dword [ebp - 0x18]
call fcn.00403850
ret