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

Disassembly:
push ebp
lea ebp, [esp - 0xa0]
sub esp, 0x120
mov eax, dword [0x4a9c04]
xor eax, ebp
mov dword [ebp + 0x9c], eax
mov eax, dword [ebp + 0xa8]
push ebx
push esi
mov esi, dword [ebp + 0xac]
push edi
push eax
lea eax, [ebp - 0x68]
xor edi, edi
push eax
mov dword [ebp - 0x6c], esi
mov dword [ebp - 0x7c], edi
call fcn.0044fb30
pop ecx
pop ecx
lea ebx, [ebp - 0x68]
cmp esi, edi
je 0x40493c
cmp dword [ebp + 0xb0], edi
jbe 0x40493c
mov byte [esi], 0
mov dword [ebp - 0x74], edi
mov dword [ebp - 0x78], edi
mov edi, dword [ebp - 0x78]
lea edi, [edi*8 + 0x487918]
push dword [edi]
call fcn.0044fc30
mov esi, eax
push esi
push dword [edi]
lea eax, [ebp - 0x68]
push eax
call fcn.00450937
add esp, 0x10
test eax, eax
jne 0x404999
lea edi, [ebp + esi - 0x68]
cmp byte [edi], 0x5c
je 0x4049a7
push 3
push 0x487914
push edi
call fcn.00450937
add esp, 0xc
test eax, eax
je 0x4049a7
push 3
push 0x487910
push edi
call fcn.00450937
add esp, 0xc
test eax, eax
je 0x4049a7
inc dword [ebp - 0x78]
cmp dword [ebp - 0x78], 0xa
jb 0x404942
mov edi, dword [ebp - 0x7c]
jmp 0x4049e0
cmp dword [0x4ad750], 0
je 0x4049bc
cmp byte [ebp + esi - 0x68], 0x36
mov edi, 0x100
je 0x4049bf
mov edi, dword [ebp - 0x7c]
mov eax, dword [ebp - 0x78]
mov eax, dword [eax*8 + 0x48791c]
xor ebx, ebx
cmp byte [ebp + esi - 0x68], 0x5c
mov dword [ebp - 0x74], eax
setne bl
lea ebx, [ebx + ebx + 1]
add ebx, esi
lea ebx, [ebp + ebx - 0x68]
cmp dword [ebp - 0x74], 0
jne 0x4049ed
xor al, al
jmp 0x404b8e
push 0x5c
push ebx
call fcn.0044ee50
mov esi, eax
pop ecx
pop ecx
test esi, esi
je 0x4049e6
lea eax, [ebp - 0x74]
push eax
or edi, 0x20019
push edi
push 0
mov byte [esi], 0
and dword [ebp - 0x70], 0
push ebx
push dword [ebp - 0x74]
inc esi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x4049e6
mov edi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
lea eax, [ebp - 0x70]
push eax
xor eax, eax
push eax
push eax
push eax
push esi
push dword [ebp - 0x74]
call edi
test eax, eax
jne 0x4049e6
mov byte [esi - 1], 0x5c
cmp dword [ebp - 0x6c], eax
je 0x404b8c
push dword [ebp - 0x70]
call fcn.00419190
or dword [ebp - 0x80], 0xffffffff
pop ecx
mov ebx, eax
lea eax, [ebp - 0x70]
push eax
push ebx
lea eax, [ebp - 0x80]
push eax
push 0
push esi
push dword [ebp - 0x74]
call edi
mov eax, dword [ebp - 0x80]
cmp eax, 1
je 0x404b7a
cmp eax, 2
je 0x404b68
cmp eax, 3
jbe 0x404aa0
cmp eax, 5
jbe 0x404b54
cmp eax, 6
je 0x404b7a
cmp eax, 7
je 0x404aee
cmp eax, 8
je 0x404b7a
mov eax, dword [ebp + 0xb0]
push 3
xor edx, edx
pop ecx
div ecx
mov edi, dword [ebp - 0x6c]
cmp dword [ebp - 0x70], eax
jb 0x404ab9
dec eax
mov dword [ebp - 0x70], eax
xor esi, esi
cmp dword [ebp - 0x70], esi
jbe 0x404adb
movzx eax, byte [esi + ebx]
push eax
push str._02X
push edi
call fcn.0044f3ea
add esp, 0xc
add edi, eax
inc esi
cmp esi, dword [ebp - 0x70]
jb 0x404ac0
cmp dword [ebp - 0x70], 0
je 0x404b85
mov byte [edi - 1], 0
jmp 0x404b85
mov esi, dword [ebp - 0x6c]
mov byte [esi], 0
cmp byte [ebx], 0
mov edi, ebx
je 0x404b85
push edi
call fcn.0044fc30
mov dword [ebp - 0x7c], eax
sub eax, dword [ebp - 0x6c]
pop ecx
lea eax, [eax + esi + 3]
cmp eax, dword [ebp + 0xb0]
jge 0x404b85
cmp esi, dword [ebp - 0x6c]
je 0x404b35
push 0x486544
push esi
call fcn.0044fb30
push 0
push esi
call fcn.0044ed90
add esp, 0x10
mov esi, eax
push edi
push esi
call fcn.0044fb30
add esi, dword [ebp - 0x7c]
push 0
push edi
call fcn.0044ed90
add esp, 0x10
inc eax
mov edi, eax
cmp byte [edi], 0
jne 0x404aff
jmp 0x404b85
push dword [ebx]
push 0x487904
push dword [ebp - 0x6c]
call fcn.0044f3ea
add esp, 0xc
jmp 0x404b85
push dword [ebp + 0xb0]
push dword [ebp - 0x6c]
push ebx
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
jmp 0x404b85
push ebx
push dword [ebp - 0x6c]
call fcn.0044fb30
pop ecx
pop ecx
push ebx
call fcn.004191bf
pop ecx
mov al, 1
mov ecx, dword [ebp + 0x9c]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0044f35b
add ebp, 0xa0
leave
ret