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

Disassembly:
sub esp, 0x24
mov eax, dword [0x45e088]
xor eax, esp
mov dword [esp + 0x20], eax
mov edx, dword [esp + 0x34]
mov eax, dword [esp + 0x38]
push ebx
push ebp
mov ebp, dword [esp + 0x34]
mov ebx, ecx
mov dword [esp + 0x14], ebp
mov dword [esp + 8], edx
mov dword [esp + 0x10], eax
push esi
mov esi, dword [esp + 0x3c]
push edi
mov edi, dword [esp + 0x38]
test ebp, ebp
je 0x412015
xor eax, eax
cmp word [ebp], ax
cmove ebp, eax
mov dword [esp + 0x1c], ebp
test edx, edx
je 0x412022
mov eax, dword [esi + 0x20]
mov dword [esp + 0x14], eax
jmp 0x41205e
lea eax, [esp + 0x10]
push eax
push 0
lea eax, [esp + 0x1c]
push eax
push 0
push ebp
push edi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
je 0x412053
mov ecx, dword [esp + 0x18]
push 0
push dword [ebx + 4]
push eax
call fcn.00414cf0
test al, al
je 0x412256
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 0x10]
mov dword [esi + 0x20], eax
cmp eax, 1
je 0x412079
cmp eax, 2
je 0x412079
cmp eax, 7
je 0x412079
xor bl, bl
test edx, edx
je 0x412160
jmp 0x412088
mov bl, 1
test edx, edx
jne 0x412088
mov edx, 2
mov dword [esp + 0x10], edx
test bl, bl
je 0x41209a
mov eax, edx
add edx, 2
and eax, 1
add edx, eax
mov dword [esp + 0x10], edx
push edx
mov ecx, esi
call fcn.00409190
test al, al
je 0x412256
lea eax, [esp + 0x10]
push eax
push dword [esi + 0x28]
push 0
push 0
push ebp
push edi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
je 0x4120ff
cmp eax, 0xea
jne 0x412256
cmp edi, 0x80000004
je 0x4120e3
cmp edi, 0x80000050
je 0x4120e3
mov edx, dword [esp + 0x10]
jmp 0x4120f9
mov edx, dword [esp + 0x10]
cmp edx, 0x100000
jae 0x412256
add edx, edx
mov dword [esp + 0x10], edx
test edx, edx
jne 0x412088
jmp 0x41215c
mov edx, dword [esp + 0x10]
test bl, bl
je 0x41215c
mov eax, dword [esi + 0x28]
cmp word [eax + edx - 2], 0
je 0x41215c
lea ebp, [edx + 2]
cmp ebp, 0x10
jbe 0x412150
push ebp
mov ecx, esi
call fcn.00409190
test al, al
je 0x412256
mov eax, dword [esp + 0x10]
mov dword [esp + 0x18], eax
lea eax, [esp + 0x18]
push eax
push dword [esi + 0x28]
push 0
push 0
push dword [esp + 0x2c]
push edi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov eax, dword [esi + 0x28]
mov edx, dword [esp + 0x10]
xor ecx, ecx
mov word [edx + eax], cx
mov edx, ebp
mov dword [esp + 0x10], edx
mov eax, dword [esp + 0x14]
mov dword [esi + 0x1c], edx
test edx, edx
je 0x4122e3
test bl, bl
je 0x4122e3
cmp eax, 7
jne 0x4121eb
mov esi, dword [esi + 0x28]
shr edx, 1
dec edx
test esi, esi
je 0x4122e3
test edx, edx
je 0x4122e3
cmp edx, 3
jb 0x4122e3
lea edx, [esi + edx*2]
cmp esi, edx
jae 0x4122e3
lea ebx, [eax + 3]
test esi, esi
je 0x4121c1
mov eax, esi
lea edi, [eax + 2]
nop
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4121b0
sub eax, edi
sar eax, 1
jmp 0x4121c3
xor eax, eax
lea esi, [esi + eax*2]
cmp esi, edx
jae 0x4121cd
mov word [esi], bx
add esi, 2
cmp esi, edx
jb 0x4121a5
pop edi
pop esi
pop ebp
mov al, 1
pop ebx
mov ecx, dword [esp + 0x20]
xor ecx, esp
call fcn.00420cb2
add esp, 0x24
ret 0x18
cmp eax, 2
jne 0x4122e3
test byte [esp + 0x4c], 1
jne 0x4122e3
mov ebx, dword [esi + 0x28]
push 0
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
mov dword [esp + 0x18], eax
lea edi, [eax + eax]
cmp edi, 0x10
jbe 0x41226d
push edi
call fcn.00427105
mov ebp, eax
add esp, 4
test ebp, ebp
jne 0x412273
mov edx, dword [0x4e241c]
mov ecx, dword fs:[0x2c]
mov ecx, dword [ecx + edx*4]
mov ecx, dword [ecx + 8]
test ecx, ecx
je 0x412252
mov ecx, dword [ecx + 0x104]
test ecx, ecx
je 0x412252
mov eax, dword [ecx]
push edi
call dword [eax + 0x14]
test ebp, ebp
jne 0x412273
pop edi
pop esi
pop ebp
xor al, al
pop ebx
mov ecx, dword [esp + 0x20]
xor ecx, esp
call fcn.00420cb2
add esp, 0x24
ret 0x18
lea ebp, [esp + 0x20]
jmp 0x412277
mov eax, dword [esp + 0x18]
push eax
push ebp
push ebx
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
mov ecx, dword [esi + 0x28]
lea ebx, [esi + 0x2c]
cmp ecx, ebx
je 0x41229f
mov eax, dword [esi + 0x14]
shr eax, 0xa
not al
test al, 1
je 0x41229f
push ecx
call fcn.00427100
add esp, 4
mov dword [esi + 0x1c], 0
mov dword [esi + 0x28], ebx
mov dword [ebx], 0
cmp edi, 0x10
jbe 0x4122d1
mov dword [esi + 0x1c], edi
mov al, 1
pop edi
mov dword [esi + 0x28], ebp
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x20]
xor ecx, esp
call fcn.00420cb2
add esp, 0x24
ret 0x18
push edi
lea eax, [esp + 0x24]
push eax
push ebx
call fcn.00422d00
add esp, 0xc
mov dword [esi + 0x1c], edi
mov ecx, dword [esp + 0x30]
mov al, 1
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00420cb2
add esp, 0x24
ret 0x18