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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x6dc
mov eax, dword [0x408028]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
push 7
mov dword [ebp - 0x6ac], eax
lea edi, [ebp - 0x6d4]
mov eax, dword [ebp + 0xc]
mov esi, ecx
pop ebx
mov dword [ebp - 0x6b8], eax
mov ecx, ebx
xor eax, eax
mov dword [ebp - 0x6d8], 0x20
rep stosd dword es:[edi], eax
xor ecx, ecx
mov dword [ebp - 0x6b4], edx
push 0x20a
push ecx
lea eax, [ebp - 0x218]
mov dword [ebp - 0x69c], esi
mov edi, ecx
mov dword [ebp - 0x68c], ecx
push eax
mov dword [ebp - 0x690], edi
call sub.api_ms_win_core_crt_l1_1_0.dll_memset
add esp, 0xc
xor eax, eax
push 0x20a
push eax
lea eax, [ebp - 0x638]
push eax
call sub.api_ms_win_core_crt_l1_1_0.dll_memset
add esp, 0xc
xor eax, eax
push 0x20a
push eax
lea eax, [ebp - 0x428]
push eax
call sub.api_ms_win_core_crt_l1_1_0.dll_memset
mov eax, dword [esi + 4]
add esp, 0xc
test eax, eax
jne 0x406296
mov ecx, dword [esi]
lea edx, [ebp - 0x68c]
call fcn.00405310
mov esi, eax
test esi, esi
je 0x406090
xor ebx, ebx
inc ebx
xor eax, eax
jmp 0x406367
lea eax, [ebp - 0x694]
mov dword [ebp - 0x694], 0x20a
push eax
lea eax, [ebp - 0x428]
push eax
lea eax, [ebp - 0x698]
push eax
xor eax, eax
push eax
push 0x4015ec
push dword [ebp - 0x68c]
call dword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegQueryValueExW]
mov esi, eax
test esi, esi
je 0x4060ce
push 2
pop ebx
jmp 0x406089
cmp dword [ebp - 0x698], 2
je 0x4060de
push 2
pop esi
push 3
jmp 0x4060cb
cmp word [ebp - 0x428], di
jne 0x4060ee
push 2
pop esi
push 4
jmp 0x4060cb
push 0x104
lea eax, [ebp - 0x218]
push eax
lea eax, [ebp - 0x428]
push eax
call dword [sym.imp.api_ms_win_core_processenvironment_l1_1_0.dll_ExpandEnvironmentStringsW]
lea ecx, [ebp - 0x218]
call fcn.00402d80
lea eax, [ebp - 0x694]
mov dword [ebp - 0x694], 0x20a
push eax
lea eax, [ebp - 0x428]
push eax
lea eax, [ebp - 0x698]
push eax
xor eax, eax
push eax
push 0x401604
push dword [ebp - 0x68c]
call dword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegQueryValueExW]
mov esi, eax
mov dword [ebp - 0x6a8], esi
test esi, esi
jne 0x406242
cmp dword [ebp - 0x698], 2
je 0x406168
push 2
pop esi
push 6
jmp 0x4060cb
cmp word [ebp - 0x428], di
jne 0x406179
push 2
pop esi
jmp 0x406089
push 0x104
lea eax, [ebp - 0x638]
push eax
lea eax, [ebp - 0x428]
push eax
call dword [sym.imp.api_ms_win_core_processenvironment_l1_1_0.dll_ExpandEnvironmentStringsW]
lea ecx, [ebp - 0x638]
call fcn.00402d80
lea ecx, [ebp - 0x218]
xor esi, esi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, si
jne 0x4061a8
sub ecx, edx
sar ecx, 1
je 0x4061d9
lea eax, [ebp - 0x218]
lea eax, [eax + ecx*2]
mov esi, eax
dec ecx
sub eax, 2
movzx edx, word [eax]
cmp edx, 0x5c
je 0x40623e
cmp edx, 0x2f
je 0x40623e
test ecx, ecx
jne 0x4061c2
lea ebx, [ebp - 0x218]
mov esi, dword [ebp - 0x69c]
lea ecx, [ebp - 0x638]
push esi
mov edx, ebx
call fcn.00405270
test eax, eax
jne 0x40627f
cmp word [ebp - 0x638], di
je 0x406253
lea eax, [ebp - 0x638]
mov dword [ebp - 0x6d0], eax
lea eax, [ebp - 0x6d8]
push eax
call dword [sym.imp.api_ms_win_core_sidebyside_l1_1_0.dll_CreateActCtxW]
mov edi, eax
mov dword [ebp - 0x690], edi
cmp edi, 0xffffffff
jne 0x406253
call dword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov esi, eax
xor eax, eax
push 8
pop ebx
mov edi, eax
jmp 0x406367
mov ebx, esi
jmp 0x4061df
cmp esi, 2
je 0x4061d9
cmp esi, 3
je 0x4061d9
push 5
jmp 0x4060cb
lea eax, [ebp - 0x6a8]
mov edx, ebx
push eax
push esi
lea ecx, [ebp - 0x638]
call fcn.004053c0
test eax, eax
jne 0x40627c
mov esi, dword [ebp - 0x6a8]
mov edi, eax
push 9
pop ebx
jmp 0x406367
mov dword [eax + 0x14], edi
mov dword [esi + 4], eax
lea eax, [esi + 8]
push eax
push ecx
mov ecx, dword [ebp - 0x68c]
call fcn.004054b0
xor edi, edi
jmp 0x4062f5
xor edi, edi
cmp dword [eax + 8], edi
jne 0x4062f5
mov eax, dword [eax + 0x10]
test eax, eax
je 0x4062f5
cmp word [eax], di
je 0x4062f5
mov dword [ebp - 0x6d0], eax
lea eax, [ebp - 0x6d8]
push eax
call dword [sym.imp.api_ms_win_core_sidebyside_l1_1_0.dll_CreateActCtxW]
mov ebx, eax
mov dword [ebp - 0x690], ebx
cmp ebx, 0xffffffff
jne 0x4062d9
call dword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
push 0xa
mov esi, eax
pop ebx
jmp 0x406367
mov eax, dword [esi + 4]
mov eax, dword [eax + 0x14]
test eax, eax
je 0x4062ef
cmp eax, 0xffffffff
je 0x4062ef
push eax
call dword [sym.imp.api_ms_win_core_sidebyside_l1_1_0.dll_ReleaseActCtx]
mov eax, dword [esi + 4]
mov dword [eax + 0x14], ebx
mov edx, dword [esi + 8]
test edx, edx
jne 0x406301
mov edx, 0x401624
mov ecx, dword [esi + 4]
lea eax, [ebp - 0x6a8]
push eax
call fcn.00405020
mov ecx, dword [ebp - 0x6b4]
mov esi, dword [ebp - 0x6a8]
mov dword [ecx], eax
test esi, esi
je 0x406327
push 0xb
pop ebx
jmp 0x406361
mov ebx, dword [ebp - 0x69c]
mov edx, 0x401630
push edi
mov ecx, dword [ebx + 4]
call fcn.00405020
mov ecx, dword [ebp - 0x6b8]
mov dword [ecx], eax
test eax, eax
jne 0x40635d
mov ecx, dword [ebx + 4]
mov edx, 0x40164c
push edi
call fcn.00405020
mov ecx, dword [ebp - 0x6ac]
mov dword [ecx], eax
mov esi, edi
mov ebx, edi
mov dword [ebp - 0x690], edi
cmp dword [ebp - 0x68c], 0
je 0x40637c
push dword [ebp - 0x68c]
call dword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCloseKey]
mov eax, dword [ebp - 0x690]
test eax, eax
je 0x406392
cmp eax, 0xffffffff
je 0x406392
push eax
call dword [sym.imp.api_ms_win_core_sidebyside_l1_1_0.dll_ReleaseActCtx]
test esi, esi
je 0x406428
cmp dword [section..data], 5
jbe 0x406428
mov edx, dword [ebp - 0x69c]
lea ecx, [ebp - 0x668]
mov edx, dword [edx]
call fcn.00406d03
lea eax, [ebp - 0x6a8]
mov dword [ebp - 0x6a8], ebx
push 8
pop edx
mov dword [ebp - 0x658], eax
xor ecx, ecx
lea eax, [ebp - 0x6b0]
mov dword [ebp - 0x650], edx
mov dword [ebp - 0x648], eax
lea eax, [ebp - 0x688]
push eax
push 5
push ecx
mov dword [ebp - 0x640], edx
mov edx, 0x401e42
push ecx
mov dword [ebp - 0x6a4], edi
mov dword [ebp - 0x654], ecx
mov dword [ebp - 0x64c], ecx
mov dword [ebp - 0x6b0], esi
mov dword [ebp - 0x6ac], ecx
mov dword [ebp - 0x644], ecx
mov dword [ebp - 0x63c], ecx
call fcn.00406d5a
mov ecx, dword [ebp - 4]
mov eax, esi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00405970
leave
ret 8