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

Disassembly:
push 0xffffffffffffffff
push 0x5d8250
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x18
push ebx
push ebp
push esi
xor esi, esi
push edi
mov dword [esp + 0x14], esi
mov eax, dword [esp + 0x44]
mov dword [esp + 0x30], esi
cmp eax, esi
mov dword [esp + 0x10], esi
jne 0x4652b7
mov eax, 0x5ee8a0
mov edi, dword [esp + 0x3c]
mov ebx, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
lea ecx, [esp + 0x10]
lea edx, [esp + 0x14]
push ecx
push esi
push edx
push esi
push eax
push edi
call ebx
cmp eax, esi
je 0x465310
mov ebp, dword [esp + 0x38]
mov al, byte [esp + 0x38]
push esi
mov ecx, ebp
mov byte [ebp], al
call fcn.00407800
mov edi, 0x67f98c
or ecx, 0xffffffff
xor eax, eax
push 1
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov ebx, ecx
mov ecx, ebp
push ebx
call fcn.0043cb30
test al, al
je 0x4653b8
jmp 0x465398
mov eax, dword [esp + 0x14]
cmp eax, 1
je 0x465328
cmp eax, 2
je 0x465328
mov ebp, dword [esp + 0x38]
mov al, byte [esp + 0x38]
jmp 0x4652dd
mov eax, dword [esp + 0x10]
inc eax
push eax
call fcn.0059dece
mov ebp, eax
mov eax, dword [esp + 0x48]
add esp, 4
cmp eax, esi
jne 0x465345
mov eax, 0x5ee8a0
lea ecx, [esp + 0x10]
lea edx, [esp + 0x14]
push ecx
push ebp
push edx
push esi
push eax
push edi
call ebx
cmp eax, esi
je 0x4653e0
push ebp
call fcn.0059def7
mov ebp, dword [esp + 0x3c]
mov al, byte [esp + 0x3c]
add esp, 4
mov ecx, ebp
mov byte [ebp], al
push esi
call fcn.00407800
mov edi, 0x67f98c
or ecx, 0xffffffff
xor eax, eax
push 1
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov ebx, ecx
mov ecx, ebp
push ebx
call fcn.0043cb30
test al, al
je 0x4653b8
mov edi, dword [ebp + 4]
mov ecx, ebx
mov edx, ecx
mov esi, 0x67f98c
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
push ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, ebp
call fcn.0043cb10
push 1
lea ecx, [esp + 0x44]
mov dword [esp + 0x34], 0xffffffff
call fcn.00407800
pop edi
mov eax, ebp
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x18]
mov dword fs:[0], ecx
add esp, 0x24
ret
cmp dword [esp + 0x14], 2
jne 0x46541a
lea eax, [esp + 0x3c]
push esi
mov esi, dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
push eax
push ebp
call esi
test eax, eax
je 0x465418
lea edi, [eax + 1]
push edi
call fcn.0059dece
add esp, 4
mov ebx, eax
push edi
push ebx
push ebp
call esi
push ebp
call fcn.0059def7
add esp, 4
mov ebp, ebx
xor esi, esi
mov cl, byte [esp + 0x38]
push esi
mov byte [esp + 0x1c], cl
lea ecx, [esp + 0x1c]
call fcn.00407800
mov edi, ebp
or ecx, 0xffffffff
xor eax, eax
push 1
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov ebx, ecx
lea ecx, [esp + 0x1c]
push ebx
call fcn.0043cb30
test al, al
je 0x46546e
mov edi, dword [esp + 0x1c]
mov ecx, ebx
mov edx, ecx
mov esi, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x20], ebx
xor esi, esi
mov byte [eax + ebx], 0
push ebp
mov byte [esp + 0x34], 1
call fcn.0059def7
mov edi, dword [esp + 0x3c]
mov cl, byte [esp + 0x1c]
add esp, 4
mov byte [edi], cl
mov ecx, edi
push esi
call fcn.00407800
mov edx, dword [0x5f35a0]
lea eax, [esp + 0x18]
push edx
push esi
push eax
mov ecx, edi
call fcn.0043c7f0
mov ecx, dword [esp + 0x1c]
cmp ecx, esi
je 0x4654c6
mov al, byte [ecx - 1]
test al, al
je 0x4654bc
cmp al, 0xff
je 0x4654bc
dec al
mov byte [ecx - 1], al
jmp 0x4654c6
dec ecx
push ecx
call fcn.0059def7
add esp, 4
mov ecx, dword [esp + 0x44]
mov dword [esp + 0x1c], esi
cmp ecx, esi
mov dword [esp + 0x20], esi
mov dword [esp + 0x24], esi
je 0x4654f6
mov al, byte [ecx - 1]
test al, al
je 0x4654ec
cmp al, 0xff
je 0x4654ec
dec al
mov byte [ecx - 1], al
jmp 0x4654f6
dec ecx
push ecx
call fcn.0059def7
add esp, 4
mov ecx, dword [esp + 0x28]
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x24
ret