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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x479af1
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x828
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
lea eax, [esp + 0xc]
push eax
push 0
mov edi, ecx
mov edx, dword [edi]
lea ecx, [esp + 0x18]
push ecx
push 0
push ebx
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
je 0x40ea63
push eax
push str.get_registry_value_length
lea ecx, [esp + 0x430]
call fcn.0044ba90
mov esi, eax
push 0x49859c
lea eax, [esp + 0x24]
mov ecx, 0x41
lea edi, [esp + 0x24]
push eax
rep movsd dword es:[edi], dword [esi]
call fcn.00459658
mov ecx, dword [esp + 0xc]
push ecx
call fcn.00459034
mov esi, eax
add esp, 4
mov dword [esp + 0x18], esi
mov ecx, dword [edi]
lea edx, [esp + 0xc]
push edx
push esi
lea eax, [esp + 0x18]
push eax
push 0
push ebx
push ecx
mov dword [esp + 0x854], 0
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
je 0x40eaca
push eax
push str.get_registry_value
lea ecx, [esp + 0x430]
call fcn.0044ba90
push 0x49859c
lea edx, [esp + 0x24]
mov esi, eax
mov ecx, 0x41
lea edi, [esp + 0x24]
push edx
rep movsd dword es:[edi], dword [esi]
call fcn.00459658
mov eax, dword [esp + 0x10]
dec eax
cmp eax, 3
ja case.default.0x40ead8
jmp dword [eax*4 + 0x40eca8]
mov eax, dword [esp + 0xc]
push eax
push esi
call fcn.0044d4b0
push 0
mov edi, eax
call fcn.00459039
push esi
call fcn.00459039
add esp, 0x10
jmp 0x40eb18
mov eax, dword [esp + 0xc]
test eax, eax
je 0x40eb31
push eax
push esi
call fcn.0040e6e0
push esi
mov edi, eax
call fcn.00459039
add esp, 0xc
mov eax, edi
mov ecx, dword [esp + 0x834]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
push 0xffffffffffffffff
push 0x4825cd
call fcn.0044b020
jmp 0x40eb0d
push 0x10
call fcn.00459034
mov ecx, dword [esi]
push ecx
mov edi, eax
push 0x484830
push edi
call fcn.00459600
push 0
call fcn.00459039
push esi
call fcn.00459039
add esp, 0x18
jmp 0x40eb18
mov eax, dword [esp + 0xc]
test eax, eax
je 0x40eb31
push eax
push esi
call fcn.0040e6e0
mov ebx, eax
add esp, 8
mov dword [esp + 0x1c], ebx
push 0
push 0
push ebx
mov byte [esp + 0x848], 1
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
mov edi, eax
test edi, edi
jne 0x40ebd3
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.ExpandEnvironmentStrings
lea ecx, [esp + 0x734]
call fcn.0044ba90
push 0x49859c
lea edx, [esp + 0x328]
mov esi, eax
mov ecx, 0x41
lea edi, [esp + 0x328]
push edx
rep movsd dword es:[edi], dword [esi]
call fcn.00459658
push edi
lea ecx, [esp + 0x18]
call fcn.00401050
mov eax, dword [esp + 0x14]
push edi
push eax
push ebx
mov byte [esp + 0x848], 2
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
cmp edi, eax
mov dword [esp + 0xc], eax
jae 0x40ec2d
push str.unable_to_expand_environment_strings
lea ecx, [esp + 0x630]
call fcn.00404c00
mov esi, eax
mov ecx, 0x40
lea edi, [esp + 0x224]
rep movsd dword es:[edi], dword [esi]
push 0x498d60
lea ecx, [esp + 0x228]
push ecx
call fcn.00459658
push 0
call fcn.00459039
push ebx
call fcn.00459039
push esi
call fcn.00459039
mov ecx, dword [esp + 0x840]
mov eax, dword [esp + 0x20]
add esp, 0xc
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret 4
push str.unsupported_registry_type
lea edx, [esp + 0x128]
push 0x100
push edx
mov byte [esp + 0x130], 0
call fcn.0044c260
add esp, 0xc
push 0x498d60
lea eax, [esp + 0x530]
mov ecx, 0x40
lea esi, [esp + 0x128]
lea edi, [esp + 0x530]
push eax
rep movsd dword es:[edi], dword [esi]
call fcn.00459658
nop
invalid