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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, 0x101c
call fcn.00418290
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 [0x443cc9], 1
sub ebx, edi
mov dword [ebp - 0x1014], esi
lea eax, [ebp - 0x1010]
push eax
push 0x2000000
push 0
push 0x402380
push dword [ebx + edi]
call dword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegOpenKeyExW]
test eax, eax
jne 0x4144b4
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 0x402360
push dword [ebp - 0x1010]
call dword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegQueryValueExW]
test eax, eax
je 0x41e510
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 0x40233c
push dword [ebp - 0x1010]
call dword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegQueryValueExW]
test eax, eax
jne 0x4142db
cmp dword [ebp - 0x1008], 4
jne 0x41e558
cmp dword [ebp - 0x1004], eax
setne byte [0x443cc9]
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 0x402318
push dword [ebp - 0x1010]
call dword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegQueryValueExW]
test eax, eax
je 0x41e584
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 0x4022fc
push dword [ebp - 0x1010]
call dword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegQueryValueExW]
test eax, eax
jne 0x414365
cmp dword [ebp - 0x1008], 4
jne 0x41e5cc
mov ax, word [ebp - 0x1004]
mov word [0x42d5a0], 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 0x4022dc
push dword [ebp - 0x1010]
call dword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegQueryValueExW]
test eax, eax
jne 0x4143d5
cmp dword [ebp - 0x1008], 4
jne 0x41e5f2
mov ax, word [ebp - 0x1004]
mov word [0x42d0d8], ax
test ax, ax
je 0x41e61f
push 0xd
pop ecx
push 0x20
cmp ax, cx
pop ecx
je 0x4143ce
cmp ax, cx
jbe 0x4143d5
mov word [0x42d0d8], cx
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 0x4022b4
push dword [ebp - 0x1010]
call dword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegQueryValueExW]
test eax, eax
jne 0x41e65c
cmp dword [ebp - 0x1008], 4
jne 0x41e627
mov ax, word [ebp - 0x1004]
mov word [0x42d0d4], ax
test ax, ax
je 0x41e654
push 0xd
pop ecx
push 0x20
pop edx
cmp ax, cx
je 0x414442
cmp ax, dx
jbe 0x41444a
mov eax, edx
mov word [0x42d0d4], ax
mov cx, word [0x42d0d8]
cmp cx, dx
jne 0x4144e8
cmp ax, dx
jb 0x41e66a
jne 0x41446e
cmp cx, dx
jb 0x4144f0
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 0x4022a4
push dword [ebp - 0x1010]
call dword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegQueryValueExW]
test eax, eax
je 0x41e675
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 0x414227
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.00416fd0
mov esp, ebp
pop ebp
ret
cmp ax, dx
jmp 0x414463
mov word [0x42d0d4], cx
jmp 0x41446e
cmp dword [ebp - 0x1008], 4
jne 0x41e52c
cmp dword [ebp - 0x1004], 0
setne byte [0x448528]
jmp 0x41428b
cmp dword [ebp - 0x1008], 1
jne 0x41428b
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 [0x448528], al
jmp 0x41428b
cmp dword [ebp - 0x1008], 1
jne 0x4142db
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 [0x443cc9], al
jmp 0x4142db
cmp dword [ebp - 0x1008], 4
jne 0x41e5a0
cmp dword [ebp - 0x1004], 0
setne byte [0x443cc8]
jmp 0x414315
cmp dword [ebp - 0x1008], 1
jne 0x414315
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 [0x443cc8], al
jmp 0x414315
cmp dword [ebp - 0x1008], 1
jne 0x414365
push 0
lea eax, [ebp - 0x1004]
push 0
push eax
call dword [sym.imp.msvcrt.dll_wcstol]
add esp, 0xc
jmp 0x41435f
cmp dword [ebp - 0x1008], 1
jne 0x41e614
push 0
lea eax, [ebp - 0x1004]
push 0
push eax
call dword [sym.imp.msvcrt.dll_wcstol]
add esp, 0xc
jmp 0x4143af
mov ax, word [0x42d0d8]
jmp 0x4143b5
push 0x20
pop ecx
jmp 0x4143ce
cmp dword [ebp - 0x1008], 1
jne 0x41e649
push 0
lea eax, [ebp - 0x1004]
push 0
push eax
call dword [sym.imp.msvcrt.dll_wcstol]
add esp, 0xc
jmp 0x414423
mov ax, word [0x42d0d4]
jmp 0x414429
push 0x20
pop edx
jmp 0x414442
mov ax, word [0x42d0d4]
push 0x20
pop edx
jmp 0x41444a
mov word [0x42d0d8], ax
jmp 0x41446e
cmp dword [ebp - 0x1008], 2
jne 0x41e6cb
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 0x41e6bc
push esi
mov edx, 0x800
lea ecx, [ebp - 0x1004]
call fcn.00411040
jmp 0x41e6c5
xor eax, eax
mov word [ebp - 0x1004], ax
mov esi, dword [ebp - 0x1014]
cmp word [ebp - 0x1004], 0
je 0x4144a8
lea ecx, [ebp - 0x1004]
call fcn.0040df40
mov dword [edi], eax
jmp 0x4144a8