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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, 0x101c
call fcn.00417e20
mov eax, dword [0x42d0b4]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push 2
mov edi, ecx
mov dword [ebp - 0x101c], 0x80000002
lea ebx, [ebp - 0x101c]
mov dword [ebp - 0x1018], 0x80000001
pop esi
mov byte [0x435745], 1
sub ebx, edi
mov dword [ebp - 0x1014], esi
lea eax, [ebp - 0x1010]
push eax
push 0x2000000
push 0
push 0x4021a0
push dword [ebx + edi]
call dword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegOpenKeyExW]
test eax, eax
jne 0x408490
and dword [ebp - 0x1008], eax
lea eax, [ebp - 0x100c]
push eax
lea eax, [ebp - 0x1004]
mov dword [ebp - 0x100c], 0x1000
push eax
lea eax, [ebp - 0x1008]
push eax
push 0
push 0x4020c4
push dword [ebp - 0x1010]
call dword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegQueryValueExW]
test eax, eax
je 0x41af8d
lea eax, [ebp - 0x100c]
mov dword [ebp - 0x100c], 0x1000
push eax
lea eax, [ebp - 0x1004]
push eax
lea eax, [ebp - 0x1008]
push eax
push 0
push 0x4020e4
push dword [ebp - 0x1010]
call dword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegQueryValueExW]
test eax, eax
jne 0x4082c1
cmp dword [ebp - 0x1008], 4
jne 0x41afd5
cmp dword [ebp - 0x1004], eax
setne byte [0x435745]
lea eax, [ebp - 0x100c]
mov dword [ebp - 0x100c], 0x1000
push eax
lea eax, [ebp - 0x1004]
push eax
lea eax, [ebp - 0x1008]
push eax
push 0
push 0x402108
push dword [ebp - 0x1010]
call dword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegQueryValueExW]
test eax, eax
je 0x41b001
lea eax, [ebp - 0x100c]
mov dword [ebp - 0x100c], 0x1000
push eax
lea eax, [ebp - 0x1004]
push eax
lea eax, [ebp - 0x1008]
push eax
push 0
push 0x40212c
push dword [ebp - 0x1010]
call dword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegQueryValueExW]
test eax, eax
jne 0x40834b
cmp dword [ebp - 0x1008], 4
jne 0x41b049
mov ax, word [ebp - 0x1004]
mov word [0x435754], ax
lea eax, [ebp - 0x100c]
mov dword [ebp - 0x100c], 0x1000
push eax
lea eax, [ebp - 0x1004]
push eax
lea eax, [ebp - 0x1008]
push eax
push 0
push 0x402148
push dword [ebp - 0x1010]
call dword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegQueryValueExW]
test eax, eax
jne 0x4083bc
cmp dword [ebp - 0x1008], 4
jne 0x41b06f
mov ax, word [ebp - 0x1004]
mov word [0x42d0d0], ax
test ax, ax
je 0x41b09c
push 0xd
pop ecx
push 0x20
cmp ax, cx
pop ecx
je 0x41b09f
cmp ax, cx
ja 0x41b09f
lea eax, [ebp - 0x100c]
mov dword [ebp - 0x100c], 0x1000
push eax
lea eax, [ebp - 0x1004]
push eax
lea eax, [ebp - 0x1008]
push eax
push 0
push 0x402168
push dword [ebp - 0x1010]
call dword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegQueryValueExW]
test eax, eax
jne 0x41b0e8
cmp dword [ebp - 0x1008], 4
jne 0x41b0ab
mov ax, word [ebp - 0x1004]
mov word [0x42d0cc], ax
test ax, ax
je 0x41b0d8
push 0xd
pop ecx
push 0x20
pop edx
cmp ax, cx
je 0x41b0db
cmp ax, dx
ja 0x41b0db
mov cx, word [0x42d0d0]
cmp cx, dx
je 0x41b0f6
cmp ax, dx
je 0x41b10a
lea eax, [ebp - 0x100c]
mov dword [ebp - 0x100c], 0x1000
push eax
lea eax, [ebp - 0x1004]
push eax
lea eax, [ebp - 0x1008]
push eax
push 0
push 0x402190
push dword [ebp - 0x1010]
call dword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegQueryValueExW]
test eax, eax
je 0x41b11f
push dword [ebp - 0x1010]
call dword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCloseKey]
add edi, 4
sub esi, 1
mov dword [ebp - 0x1014], esi
jne 0x40820d
push 0
call dword [sym.imp.msvcrt.dll_time]
push eax
call dword [sym.imp.msvcrt.dll_srand]
pop ecx
pop ecx
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00416ad0
leave
ret
cmp dword [ebp - 0x1008], 4
jne 0x41afa9
cmp dword [ebp - 0x1004], 0
setne byte [0x44803d]
jmp 0x408271
cmp dword [ebp - 0x1008], 1
jne 0x408271
lea eax, [ebp - 0x1004]
push eax
call dword [sym.imp.msvcrt.dll__wtol]
dec eax
neg eax
pop ecx
sbb al, al
inc al
mov byte [0x44803d], al
jmp 0x408271
cmp dword [ebp - 0x1008], 1
jne 0x4082c1
lea eax, [ebp - 0x1004]
push eax
call dword [sym.imp.msvcrt.dll__wtol]
dec eax
neg eax
pop ecx
sbb al, al
inc al
mov byte [0x435745], al
jmp 0x4082c1
cmp dword [ebp - 0x1008], 4
jne 0x41b01d
cmp dword [ebp - 0x1004], 0
setne byte [0x435744]
jmp 0x4082fb
cmp dword [ebp - 0x1008], 1
jne 0x4082fb
lea eax, [ebp - 0x1004]
push eax
call dword [sym.imp.msvcrt.dll__wtol]
dec eax
neg eax
pop ecx
sbb al, al
inc al
mov byte [0x435744], al
jmp 0x4082fb
cmp dword [ebp - 0x1008], 1
jne 0x40834b
push 0
lea eax, [ebp - 0x1004]
push 0
push eax
call dword [sym.imp.msvcrt.dll_wcstol]
add esp, 0xc
jmp 0x408345
cmp dword [ebp - 0x1008], 1
jne 0x41b091
push 0
lea eax, [ebp - 0x1004]
push 0
push eax
call dword [sym.imp.msvcrt.dll_wcstol]
add esp, 0xc
jmp 0x408395
mov ax, word [0x42d0d0]
jmp 0x40839b
push 0x20
pop ecx
mov word [0x42d0d0], cx
jmp 0x4083bc
cmp dword [ebp - 0x1008], 1
jne 0x41b0cd
push 0
lea eax, [ebp - 0x1004]
push 0
push eax
call dword [sym.imp.msvcrt.dll_wcstol]
add esp, 0xc
jmp 0x40840a
mov ax, word [0x42d0cc]
jmp 0x408410
push 0x20
pop edx
mov eax, edx
mov word [0x42d0cc], ax
jmp 0x408431
mov ax, word [0x42d0cc]
push 0x20
pop edx
jmp 0x408431
cmp ax, dx
jae 0x408444
mov word [0x42d0d0], ax
jmp 0x40844a
cmp cx, dx
jae 0x40844a
mov word [0x42d0cc], cx
jmp 0x40844a
cmp dword [ebp - 0x1008], 2
jne 0x41b175
mov ecx, dword [ebp - 0x100c]
lea esi, [ebp - 0x1000]
shr ecx, 1
mov eax, 0x7fe
sub eax, ecx
push eax
lea eax, [ebp - 0x1004]
lea esi, [esi + ecx*2]
push esi
push eax
call dword [sym.imp.api_ms_win_core_processenvironment_l1_1_0.dll_ExpandEnvironmentStringsW]
test eax, eax
je 0x41b166
push esi
mov edx, 0x800
lea ecx, [ebp - 0x1004]
call fcn.0040f2e0
jmp 0x41b16f
xor eax, eax
mov word [ebp - 0x1004], ax
mov esi, dword [ebp - 0x1014]
cmp word [ebp - 0x1004], 0
je 0x408484
lea ecx, [ebp - 0x1004]
call fcn.0040abd0
mov dword [edi], eax
jmp 0x408484