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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5d9336
mov eax, dword fs:[0]
push eax
mov eax, 0x17a8
call fcn.005a9510
mov eax, dword [0x65afd4]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, edx
mov dword [ebp - 0x17a4], ebx
mov esi, ecx
mov byte [ebp - 0x1799], 0
mov dword [ebp - 0x17b4], 0
mov dword [ebp - 0x17b0], 0
mov dword [ebp - 0x17ac], 0
push str.SOFTWAREMicrosoftWindowsCurrentVersionApp_Paths_
lea ecx, [ebp - 0x1798]
mov dword [ebp - 4], 0
call fcn.004076f8
mov byte [ebp - 4], 1
mov edx, esi
cmp dword [esi + 0x14], 8
jb 0x437ac6
mov edx, dword [esi]
mov ecx, dword [esi + 0x10]
mov esi, dword [ebp - 0x1788]
mov eax, dword [ebp - 0x1784]
sub eax, esi
mov dword [ebp - 0x17a0], esi
cmp ecx, eax
ja 0x437b1d
cmp dword [ebp - 0x1784], 8
lea edi, [esi + ecx]
lea eax, [ecx + ecx]
mov dword [ebp - 0x1788], edi
push eax
mov eax, dword [ebp - 0x17a0]
lea esi, [ebp - 0x1798]
cmovae esi, dword [ebp - 0x1798]
push edx
lea eax, [esi + eax*2]
push eax
call fcn.005acee0
add esp, 0xc
xor eax, eax
mov word [esi + edi*2], ax
jmp 0x437b38
push ecx
push edx
mov byte [ebp - 0x17a0], 0
push dword [ebp - 0x17a0]
push ecx
lea ecx, [ebp - 0x1798]
call fcn.0041ad40
cmp dword [ebp - 0x1784], 8
lea eax, [ebp - 0x1798]
push 0x20019
cmovae eax, dword [ebp - 0x1798]
lea ecx, [ebp - 0x17b4]
push eax
push reloc.OLEAUT32.dll_SysReAllocString
call fcn.0042f890
mov esi, dword [ebp - 0x17b4]
test eax, eax
jne 0x437bc8
lea eax, [ebp - 0x17a0]
mov dword [ebp - 0x17a0], 0x7d0
push eax
lea eax, [ebp - 0x7e0]
push eax
lea eax, [ebp - 0x17a8]
push eax
push 0
push 0x626018
push esi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x437bc8
mov eax, dword [ebp - 0x17a8]
cmp eax, 1
je 0x437bad
cmp eax, 2
jne 0x437bc8
mov eax, dword [ebp - 0x17a0]
test eax, eax
je 0x437c21
test al, 1
jne 0x437bc8
shr eax, 1
cmp word [ebp + eax*2 - 0x7e2], 0
je 0x437c2a
mov bl, byte [ebp - 0x1799]
lea ecx, [ebp - 0x1798]
mov byte [ebp - 4], 0
call fcn.004076c4
mov dword [ebp - 4], 0xffffffff
test esi, esi
je 0x437bf9
push esi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [ebp - 0x17b4], 0
mov dword [ebp - 0x17b0], 0
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.005a8a56
mov esp, ebp
pop ebp
ret
xor eax, eax
mov word [ebp - 0x7e0], ax
push 0x7d0
lea eax, [ebp - 0x1780]
push eax
lea eax, [ebp - 0x7e0]
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
lea esi, [ebp - 0x1780]
lea ecx, [esi + 2]
nop dword [eax]
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x437c50
sub esi, ecx
mov ecx, dword [ebx + 0x14]
sar esi, 1
mov dword [ebp - 0x17a8], ecx
cmp esi, ecx
ja 0x437c9e
mov edi, ebx
cmp ecx, 8
jb 0x437c75
mov edi, dword [ebx]
mov dword [ebx + 0x10], esi
lea eax, [ebp - 0x1780]
add esi, esi
push esi
push eax
push edi
call fcn.005acee0
add esp, 0xc
mov bl, 1
xor eax, eax
mov word [esi + edi], ax
mov esi, dword [ebp - 0x17b4]
jmp 0x437bce
cmp esi, 0x7ffffffe
ja 0x437da2
mov edi, esi
or edi, 7
cmp edi, 0x7ffffffe
jbe 0x437cbe
mov edi, SysReAllocString
jmp 0x437cdc
mov edx, ecx
mov eax, SysReAllocString
shr edx, 1
sub eax, edx
cmp ecx, eax
jbe 0x437cd4
mov edi, SysReAllocString
jmp 0x437cdc
lea eax, [edx + ecx]
cmp edi, eax
cmovb edi, eax
lea eax, [edi + 1]
lea ecx, [eax + eax]
cmp eax, 0x7fffffff
jbe 0x437cee
or ecx, 0xffffffff
jmp 0x437cf6
cmp ecx, 0x1000
jb 0x437d1d
lea eax, [ecx + 0x23]
or edx, 0xffffffff
cmp eax, ecx
cmovbe eax, edx
push eax
call fcn.00462143
add esp, 4
test eax, eax
je 0x437da7
lea ebx, [eax + 0x23]
and ebx, 0xffffffe0
mov dword [ebx - 4], eax
jmp 0x437d30
test ecx, ecx
je 0x437d2e
push ecx
call fcn.00462143
add esp, 4
mov ebx, eax
jmp 0x437d30
xor ebx, ebx
mov eax, dword [ebp - 0x17a4]
mov dword [eax + 0x10], esi
add esi, esi
mov dword [eax + 0x14], edi
lea eax, [ebp - 0x1780]
push esi
push eax
push ebx
call fcn.005ac960
mov ecx, dword [ebp - 0x17a8]
xor eax, eax
add esp, 0xc
mov word [esi + ebx], ax
mov esi, dword [ebp - 0x17a4]
cmp ecx, 8
jb 0x437d93
mov eax, dword [esi]
lea ecx, [ecx*2 + 2]
cmp ecx, 0x1000
jb 0x437d89
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x437da7
mov eax, edx
push ecx
push eax
call fcn.005a8d24
add esp, 8
mov dword [esi], ebx
mov bl, 1
mov esi, dword [ebp - 0x17b4]
jmp 0x437bce
call fcn.00405425
call fcn.005b0079
int3