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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x41c
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
movzx eax, byte [ecx + 0x13]
push ebx
push esi
push edi
push eax
movzx eax, byte [ecx + 0x12]
mov edi, 0x100
push eax
movzx eax, byte [ecx + 0x11]
xor ebx, ebx
push eax
movzx eax, byte [ecx + 0x10]
push eax
movzx eax, byte [ecx + 0xf]
push eax
movzx eax, byte [ecx + 0xe]
push eax
movzx eax, byte [ecx + 0xd]
mov esi, dword [ebp + 8]
push eax
movzx eax, byte [ecx + 0xc]
push eax
movzx eax, word [ecx + 0xa]
push eax
movzx eax, word [ecx + 8]
push eax
push dword [ecx + 4]
lea eax, [ebp - 0x408]
mov dword [ebp - 0x418], 0x208
push 0x406298
push edi
push eax
mov dword [ebp - 0x410], ebx
call fcn.00419392
add esp, 0x38
test eax, eax
jns 0x42d334
xor eax, eax
jmp 0x42d4b9
lea eax, [ebp - 0x408]
push eax
push 0x406254
lea eax, [ebp - 0x208]
push edi
push eax
call fcn.00419392
add esp, 0x10
test eax, eax
js 0x42d32d
lea eax, [ebp - 0x40c]
push eax
push 0x20019
push ecx
lea edx, [ebp - 0x208]
mov ecx, SysReAllocStringLen
call fcn.0040ad96
test eax, eax
jne 0x42d4b7
lea eax, [ebp - 0x418]
push eax
push esi
lea eax, [ebp - 0x410]
push eax
push ebx
push ebx
push dword [ebp - 0x40c]
call dword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegQueryValueExW]
mov edi, eax
mov edx, 0x104
push 2
pop eax
mov dword [ebp - 0x414], edi
cmp dword [ebp - 0x410], eax
jne 0x42d422
xor ecx, ecx
mov eax, edx
push 2
pop edx
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0042fb0d
mov edi, eax
mov dword [esp], 0x104
push edi
push esi
call dword [sym.imp.api_ms_win_core_processenvironment_l1_2_0.dll_ExpandEnvironmentStringsW]
test eax, eax
je 0x42d445
cmp eax, 0x104
jae 0x42d445
mov ecx, edi
call fcn.0040a4a1
mov ecx, 0x104
cmp eax, ecx
jb 0x42d3fc
mov edx, ecx
mov ecx, esi
push edi
call fcn.0040ad6a
jmp 0x42d40b
push eax
push edi
push ecx
push esi
call dword [sym.imp.msvcrt.dll_wcsncpy_s]
add esp, 0x10
mov eax, ebx
push edi
test eax, eax
jne 0x42d446
call dword [sym.imp.msvcrt.dll_void___cdecl_operator_delete___void__]
mov edi, dword [ebp - 0x414]
mov edx, 0x104
pop ecx
test esi, esi
je 0x42d45e
push edx
push esi
call dword [sym.imp.msvcrt.dll_wcsnlen]
mov edx, 0x104
pop ecx
pop ecx
cmp eax, edx
je 0x42d45e
lea ecx, [ebp - 0x41c]
test ecx, ecx
je 0x42d49e
jmp 0x42d46a
push edi
call dword [sym.imp.msvcrt.dll_void___cdecl_operator_delete___void__]
pop ecx
push dword [ebp - 0x40c]
call dword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCloseKey]
jmp 0x42d32d
lea eax, [ebp - 0x41c]
test eax, eax
je 0x42d49e
mov eax, ebx
test eax, eax
je 0x42d49e
push 0x22
pop ecx
cmp word [esi], cx
jne 0x42d49e
cmp word [esi + eax*2 - 2], cx
jne 0x42d49e
lea ecx, [eax - 2]
lea eax, [esi + 2]
cmp ecx, edx
jb 0x42d491
push eax
mov ecx, esi
call fcn.0040ad6a
jmp 0x42d49e
push ecx
push eax
push edx
push esi
call dword [sym.imp.msvcrt.dll_wcsncpy_s]
add esp, 0x10
push dword [ebp - 0x40c]
call dword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCloseKey]
test edi, edi
jne 0x42d4b7
mov ecx, esi
call fcn.0040a4a1
mov ebx, eax
mov eax, ebx
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0042f1b0
mov esp, ebp
pop ebp
ret 8