Function at 0x4740f0
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.00404aac
mov eax, dword [ebp - 8]
call fcn.00404aac
xor eax, eax
push ebp
push 0x474484
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, ebx
call fcn.004045fc
call fcn.004740cc
mov dword [ebp - 0x18], eax
xor eax, eax
push ebp
push 0x474447
push dword fs:[eax]
mov dword fs:[eax], esp
mov edx, esi
mov eax, dword [ebp - 0x18]
call fcn.004315c4
xor ecx, ecx
mov edx, dword [ebp - 4]
mov eax, dword [ebp - 0x18]
call fcn.00431628
test al, al
je 0x474431
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 0x18]
call fcn.00431b60
test al, al
je 0x474431
lea eax, [ebp - 0xc]
push eax
push 0
lea eax, [ebp - 0x10]
push eax
push 0
mov eax, dword [ebp - 8]
call fcn.00404abc
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 0x4741ca
dec eax
je 0x4741dc
add eax, 0xfffffffe
sub eax, 2
jb 0x47425a
dec eax
je 0x474271
jmp 0x4742dd
mov ecx, ebx
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 0x18]
call fcn.004319e0
jmp 0x474429
mov ecx, ebx
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 0x18]
call fcn.004319e0
mov eax, dword [ebp - 0xc]
test eax, eax
jns 0x4741f5
call fcn.004036fc
push eax
push 0
mov eax, dword [ebx]
call fcn.00404abc
push eax
call sub.kernel32.dll_ExpandEnvironmentStringsA
test eax, eax
jns 0x47420e
call fcn.004036fc
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jle 0x474429
mov eax, dword [ebp - 0xc]
test eax, eax
jns 0x474227
call fcn.004036fc
push eax
lea eax, [ebp - 0x419]
push eax
mov eax, dword [ebx]
call fcn.00404abc
push eax
call sub.kernel32.dll_ExpandEnvironmentStringsA
test eax, eax
jns 0x474245
call fcn.004036fc
mov dword [ebp - 0xc], eax
mov eax, ebx
lea edx, [ebp - 0x419]
call fcn.004047f4
jmp 0x474429
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 0x18]
call fcn.00431a58
mov edx, ebx
call fcn.00408c94
jmp 0x474429
mov eax, ebx
call fcn.004045fc
cmp dword [ebp - 0xc], 0xffffffff
jle 0x474429
mov eax, dword [ebp - 0xc]
push eax
lea ecx, [ebp - 0x419]
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 0x18]
call fcn.00431a88
mov dl, 1
mov eax, dword [0x417918]
call fcn.00403790
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x14]
push eax
mov ecx, dword [ebp - 0xc]
test ecx, ecx
jns 0x4742b6
call fcn.004036fc
lea eax, [ebp - 0x419]
mov edx, 0x400
call fcn.00474558
mov edx, ebx
mov eax, dword [ebp - 0x14]
mov ecx, dword [eax]
call dword [ecx + 0x1c]
mov eax, dword [ebp - 0x14]
call fcn.004037c0
jmp 0x474429
mov eax, ebx
call fcn.004045fc
cmp dword [ebp - 0xc], 0xffffffff
jle 0x474429
mov eax, dword [ebp - 0xc]
push eax
lea ecx, [ebp - 0x419]
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 0x18]
call fcn.00431a88
cmp byte [ebp + 0xc], 0
je 0x4743c0
xor esi, esi
cmp esi, 0x400
jbe 0x47431c
call fcn.004036fc
cmp byte [ebp + esi - 0x419], 0
je 0x474371
lea eax, [ebp - 0x420]
push eax
cmp esi, 0x400
jbe 0x47433a
call fcn.004036fc
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, 0x47449c
call fcn.00409f2c
mov edx, dword [ebp - 0x420]
mov eax, ebx
call fcn.004048c4
jmp 0x4743ab
lea eax, [ebp - 0x42c]
push eax
mov eax, dword [ebx]
call fcn.004048bc
mov edx, eax
mov eax, dword [ebx]
mov ecx, 1
call fcn.00404b1c
mov eax, dword [ebp - 0x42c]
mov edx, 0x4744ac
call fcn.00404a08
je 0x4743ab
mov eax, ebx
mov edx, 0x4744b8
call fcn.004048c4
mov eax, dword [ebx]
call fcn.004048bc
mov edx, eax
sub edx, 2
mov eax, ebx
call fcn.00404c48
jmp 0x474429
mov edi, dword [ebp - 0xc]
dec edi
test edi, edi
jl 0x474418
inc edi
xor esi, esi
lea eax, [ebp - 0x430]
push eax
cmp esi, 0x400
jbe 0x4743df
call fcn.004036fc
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, 0x4744c4
call fcn.00409f2c
mov edx, dword [ebp - 0x430]
mov eax, ebx
call fcn.004048c4
inc esi
dec edi
jne 0x4743cb
mov eax, dword [ebx]
call fcn.004048bc
mov edx, eax
dec edx
mov eax, ebx
call fcn.00404c48
mov eax, dword [ebp - 0x18]
call fcn.00431594
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x47444e
mov eax, dword [ebp - 0x18]
call fcn.004037c0
ret