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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x2c
push esi
push edi
xor eax, eax
lea edi, [ebp - 0x2c]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
xor ecx, ecx
stosd dword es:[edi], eax
xor edi, edi
inc edi
mov dword [ebp - 0xc], ecx
mov dword [ebp - 0x10], ecx
mov dword [ebp - 0x14], ecx
mov dword [ebp - 0x18], ecx
mov dword [ebp - 4], ecx
mov dword [ebp - 8], ecx
cmp dword [ebx + 0x24], ecx
je 0x412df4
mov edi, 0x101
push ecx
lea eax, [ebp - 0xc]
push eax
push dword [ebx + 0x1c]
push dword [ebp + 8]
call fcn.00414064
mov esi, eax
test esi, esi
jns 0x412e14
push 0x43f5aa
jmp 0x4130dc
mov eax, dword [ebx + 0x20]
test eax, eax
je 0x412e3a
push 0
lea ecx, [ebp - 0x10]
push ecx
push eax
push dword [ebp + 8]
call fcn.00414064
mov esi, eax
test esi, esi
jns 0x412e3a
push 0x43f58a
jmp 0x4130dc
lea eax, [ebp - 0x14]
push eax
push edi
push dword [ebp - 0xc]
push dword [ebx + 0x18]
call fcn.0043259a
mov esi, eax
cmp esi, 0x80070002
jne 0x412e8e
push dword [ebp - 0xc]
push 0x43f566
push 1
call fcn.004306ba
add esp, 0xc
push 0
lea eax, [ebp - 0x2c]
push eax
push dword [ebx + 4]
push dword [ebp + 8]
call fcn.00415abc
mov esi, eax
test esi, esi
jns 0x412e87
push 0x43f72a
jmp 0x4130dc
xor esi, esi
jmp 0x4130fb
test esi, esi
jns 0x412e9c
push 0x43f70c
jmp 0x4130dc
mov esi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
lea eax, [ebp - 4]
push eax
push 0
lea eax, [ebp - 0x18]
push eax
push 0
push dword [ebp - 0x10]
push dword [ebp - 0x14]
call esi
push 2
pop edi
cmp eax, edi
jne 0x412ed4
push dword [ebp - 0x10]
push dword [ebp - 0xc]
push 0x43f4aa
push 1
call fcn.004306ba
add esp, 0x10
jmp 0x412e66
test eax, eax
je 0x412f09
jle 0x412ee4
and eax, 0xffff
or eax, 0x80070000
mov esi, eax
test esi, esi
js 0x412eef
mov esi, 0x80004005
push esi
push 0x359
push 0x43f504
call fcn.004315c0
push 0x43f6e2
jmp 0x4130dc
mov eax, dword [ebp - 4]
push 1
add eax, 2
push eax
call fcn.0043176e
mov dword [ebp - 8], eax
test eax, eax
jne 0x412f45
mov esi, 0x8007000e
push esi
push 0x35c
push 0x43f504
call fcn.004315c0
push 0x43f6b8
push esi
call fcn.00430a6a
pop ecx
pop ecx
jmp 0x4130e8
lea ecx, [ebp - 4]
push ecx
push eax
lea eax, [ebp - 0x18]
push eax
push 0
push dword [ebp - 0x10]
push dword [ebp - 0x14]
call esi
test eax, eax
je 0x412f8d
jle 0x412f68
and eax, 0xffff
or eax, 0x80070000
mov esi, eax
test esi, esi
js 0x412f73
mov esi, 0x80004005
push esi
push 0x35f
push 0x43f504
call fcn.004315c0
push 0x43f4e0
jmp 0x4130dc
mov eax, dword [ebp - 0x18]
dec eax
je 0x41308c
dec eax
je 0x412ff4
sub eax, edi
je 0x412fe4
sub eax, 7
je 0x412fbe
push dword [ebp - 0x18]
mov esi, 0x80004001
push 0x43f686
push esi
call fcn.00430a6a
add esp, 0xc
jmp 0x4130e8
cmp dword [ebp - 4], 8
je 0x412fce
mov esi, 0x8000ffff
jmp 0x4130e8
mov eax, dword [ebp - 8]
push dword [eax + 4]
push dword [eax]
lea eax, [ebp - 0x2c]
push eax
call fcn.00428b38
jmp 0x41309a
cmp dword [ebp - 4], 4
jne 0x412fc4
mov eax, dword [ebp - 8]
mov eax, dword [eax]
cdq
push edx
push eax
jmp 0x412fd6
cmp dword [ebx + 0x28], 0
je 0x41308c
push dword [ebp - 4]
lea eax, [ebp - 0x2c]
push eax
call fcn.0042ea4e
mov esi, eax
test esi, esi
jns 0x41301a
push 0x43f664
jmp 0x4130dc
push dword [ebp - 4]
mov dword [ebp - 0x24], edi
push dword [ebp - 0x2c]
mov edi, dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
push dword [ebp - 8]
call edi
mov dword [ebp - 0x1c], eax
cmp eax, dword [ebp - 4]
jbe 0x41309c
push eax
lea eax, [ebp - 0x2c]
push eax
call fcn.0042ea4e
mov esi, eax
test esi, esi
js 0x413010
push dword [ebp - 0x1c]
push dword [ebp - 0x2c]
push dword [ebp - 8]
call edi
cmp dword [ebp - 0x1c], eax
je 0x41309c
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x41306a
and eax, 0xffff
or eax, 0x80070000
mov esi, eax
test esi, esi
js 0x413075
mov esi, 0x80004005
push esi
push 0x380
push 0x43f504
call fcn.004315c0
push 0x43f63a
jmp 0x4130dc
push 0
push dword [ebp - 8]
lea eax, [ebp - 0x2c]
push eax
call fcn.00428b78
mov esi, eax
test esi, esi
jns 0x4130a7
push 0x43f61a
jmp 0x4130dc
push dword [ebx + 0x14]
lea eax, [ebp - 0x2c]
push eax
call fcn.00428c86
mov esi, eax
test esi, esi
jns 0x4130c0
push 0x43f5fc
jmp 0x4130dc
push 0
lea eax, [ebp - 0x2c]
push eax
push dword [ebx + 4]
push dword [ebp + 8]
call fcn.00415abc
mov esi, eax
test esi, esi
jns 0x4130fb
push 0x43f3a0
push esi
call fcn.00430a6a
pop ecx
pop ecx
test esi, esi
jns 0x4130fb
push esi
push dword [ebp - 0xc]
push 0x43f5c8
push 1
call fcn.004306ba
add esp, 0x10
xor edi, edi
cmp dword [ebp - 0xc], edi
je 0x41310a
push dword [ebp - 0xc]
call fcn.0042eb62
cmp dword [ebp - 0x10], edi
je 0x413117
push dword [ebp - 0x10]
call fcn.0042eb62
cmp dword [ebp - 0x14], edi
je 0x413128
push dword [ebp - 0x14]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [ebp - 0x14], edi
cmp dword [ebp - 8], edi
je 0x413135
push dword [ebp - 8]
call fcn.004318fe
lea eax, [ebp - 0x2c]
push eax
call fcn.004289e2
pop edi
mov eax, esi
pop esi
leave
ret 4