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

Disassembly:
push 0x84
mov eax, 0x45b38b
call fcn.00438d0a
mov edi, dword [ebp + 0x10]
xor ebx, ebx
mov ecx, dword [ebp + 0xc]
mov eax, dword [ebp + 8]
mov dword [ebp - 0x8c], ecx
lea ecx, [ebp - 0x68]
push eax
mov dword [ebp - 0x90], edi
mov dword [edi], ebx
call fcn.00413941
mov esi, ebx
mov dword [ebp - 4], ebx
mov dword [ebp - 0x38], esi
mov dword [ebp - 0x34], ebx
mov dword [ebp - 0x30], ebx
push ebx
push 0x405efc
lea ecx, [ebp - 0x68]
mov byte [ebp - 4], 1
call fcn.00420fed
mov dword [ebp - 0x18], eax
cmp eax, 0xffffffff
jne 0x436d42
lea ecx, [ebp - 0x68]
call fcn.00414f1b
xor al, al
jmp 0x436f2d
lea ecx, [ebp - 0x85]
push ecx
push eax
push ebx
lea eax, [ebp - 0x68]
push eax
lea ecx, [ebp - 0x50]
call fcn.00415237
mov eax, dword [ebp - 0x58]
lea edx, [ebp - 0x85]
mov ecx, dword [ebp - 0x18]
sub eax, ecx
dec eax
mov byte [ebp - 4], 2
push edx
push eax
lea eax, [ecx + 1]
push eax
lea eax, [ebp - 0x68]
push eax
lea ecx, [ebp - 0x80]
call fcn.00415237
push 0x405f18
lea ecx, [ebp - 0x50]
mov byte [ebp - 4], 3
call fcn.00419b8a
test eax, eax
je 0x436e3a
push 0x405f74
lea ecx, [ebp - 0x50]
call fcn.00419b8a
test eax, eax
je 0x436e3a
push 0x405f0c
lea ecx, [ebp - 0x50]
call fcn.00419b8a
test eax, eax
je 0x436e33
push 0x405f50
lea ecx, [ebp - 0x50]
call fcn.00419b8a
test eax, eax
je 0x436e33
push 0x405f00
lea ecx, [ebp - 0x50]
call fcn.00419b8a
test eax, eax
je 0x436e2c
push 0x405f2c
lea ecx, [ebp - 0x50]
call fcn.00419b8a
test eax, eax
je 0x436e2c
push 0x405f24
lea ecx, [ebp - 0x50]
call fcn.00419b8a
test eax, eax
je 0x436e25
push 0x405f9c
lea ecx, [ebp - 0x50]
call fcn.00419b8a
test eax, eax
je 0x436e25
lea ecx, [ebp - 0x80]
call fcn.00414f1b
lea ecx, [ebp - 0x50]
call fcn.00414f1b
jmp 0x436d33
mov eax, 0x80000003
jmp 0x436e3f
mov eax, 0x80000000
jmp 0x436e3f
mov eax, 0x80000001
jmp 0x436e3f
mov eax, 0x80000002
cmp dword [ebp - 0x6c], 8
lea ecx, [ebp - 0x80]
mov dword [ebp - 0x84], ebx
jb 0x436e51
mov ecx, dword [ebp - 0x80]
lea edx, [ebp - 0x84]
push edx
push 0x20019
push ebx
push ecx
push eax
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x436efe
lea eax, [ebp - 0x20]
mov byte [ebp - 4], 4
push eax
push ebx
lea eax, [ebp - 0x1c]
mov dword [ebp - 0x1c], ebx
push eax
push ebx
push dword [ebp - 0x8c]
mov dword [ebp - 0x20], ebx
push dword [ebp - 0x84]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x436ef2
mov eax, dword [ebp - 0x20]
test eax, eax
je 0x436ef2
cmp dword [ebp - 0x1c], 1
je 0x436f33
cmp dword [ebp - 0x1c], 2
je 0x436f33
cmp dword [ebp - 0x1c], 4
jne 0x436ef2
cmp eax, 4
jne 0x436ef2
lea eax, [ebp - 0x20]
mov dword [ebp - 0x18], ebx
push eax
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x1c]
push eax
push ebx
push dword [ebp - 0x8c]
push dword [ebp - 0x84]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x436ef2
mov eax, dword [ebp - 0x18]
mov dword [edi], 2
mov dword [edi + 0x1c], eax
mov bl, 1
push dword [ebp - 0x84]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea ecx, [ebp - 0x80]
call fcn.00414f1b
lea ecx, [ebp - 0x50]
call fcn.00414f1b
test esi, esi
je 0x436f23
mov ecx, dword [ebp - 0x30]
sub ecx, esi
and ecx, 0xfffffffe
push ecx
push esi
call fcn.00413839
pop ecx
pop ecx
lea ecx, [ebp - 0x68]
call fcn.00414f1b
mov al, bl
call fcn.00438c5c
ret
lea ecx, [ebp - 0x18]
mov dword [ebp - 0x18], ebx
push ecx
push eax
lea ecx, [ebp - 0x38]
call fcn.00429c08
mov esi, dword [ebp - 0x38]
lea eax, [ebp - 0x20]
push eax
push esi
lea eax, [ebp - 0x1c]
push eax
push ebx
push dword [ebp - 0x8c]
push dword [ebp - 0x84]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x436ef2
inc eax
cmp dword [ebp - 0x1c], eax
jne 0x436f7c
push esi
lea ecx, [edi + 4]
mov dword [edi], eax
call fcn.00414f74
jmp 0x436ef0
push ebx
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
mov edi, eax
test edi, edi
je 0x436ef2
lea eax, [ebp - 0x18]
mov dword [ebp - 0x18], ebx
push eax
push edi
lea ecx, [ebp - 0x2c]
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x24], ebx
call fcn.00415001
push edi
mov edi, dword [ebp - 0x2c]
push edi
push esi
mov byte [ebp - 4], 5
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
je 0x436fd3
mov ecx, dword [ebp - 0x90]
push edi
mov dword [ecx], 1
add ecx, 4
call fcn.00414f74
mov bl, 1
test edi, edi
je 0x436ef2
mov eax, dword [ebp - 0x24]
sub eax, edi
and eax, 0xfffffffe
push eax
push edi
call fcn.00413839
pop ecx
pop ecx
jmp 0x436ef2