Function at 0x477440
Capabilities:
Get common file path
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x523689
mov eax, dword fs:[0]
push eax
sub esp, 0xf0
mov eax, dword [0x579630]
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, dword [ebp + 8]
lea ecx, [ebp - 0xc4]
xor eax, eax
mov dword [ebp - 0xec], 0
push eax
push 0x52d9b8
mov dword [ebp - 0xfc], ebx
mov dword [ebp - 0xb0], 7
mov dword [ebp - 0xb4], 0
mov word [ebp - 0xc4], ax
call fcn.00407750
push 0x20119
lea eax, [ebp - 0xa8]
mov dword [ebp - 4], 1
mov ecx, 0x26
lea edi, [ebp - 0xa8]
mov esi, str.SoftwareClassesCLSID054AAE20_4BEA_4347_8A35_64A533254A9DLocalServer32
xorps xmm0, xmm0
rep movsd dword es:[edi], dword [esi]
push eax
push 0x80000002
lea ecx, [ebp - 0xcc]
movq qword [ebp - 0xcc], xmm0
call fcn.0040dca0
push 0
lea eax, [ebp - 0xe8]
mov byte [ebp - 4], 2
push eax
lea eax, [ebp - 0xc4]
mov dword [ebp - 0xe8], 0x400
push 0x400
push eax
call fcn.00473a80
add esp, 8
lea ecx, [ebp - 0xcc]
push eax
push 0
call fcn.004282a0
test eax, eax
jne 0x4777a5
mov edx, dword [ebp - 0xb4]
test edx, edx
je 0x4777a5
mov esi, dword [ebp - 0xb0]
lea ecx, [ebp - 0xc4]
mov edi, dword [ebp - 0xc4]
cmp esi, 8
cmovae ecx, edi
lea eax, [ecx + 2]
mov dword [ebp - 0xac], eax
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x477560
sub ecx, dword [ebp - 0xac]
sar ecx, 1
cmp ecx, edx
ja 0x477591
cmp esi, 8
mov dword [ebp - 0xb4], ecx
lea eax, [ebp - 0xc4]
cmovae eax, edi
xor edx, edx
mov word [eax + ecx*2], dx
jmp 0x4775a1
sub ecx, edx
push 0
push ecx
lea ecx, [ebp - 0xc4]
call fcn.0040e250
push 0x14
push 0
push str._CommonProgramFiles_
lea ecx, [ebp - 0xc4]
call fcn.0040cdd0
cmp eax, 0xffffffff
je 0x477793
push 0x14
push eax
lea ecx, [ebp - 0xc4]
call fcn.004248c0
xor eax, eax
mov dword [ebp - 0xd0], 7
mov dword [ebp - 0xd4], 0
mov word [ebp - 0xe4], ax
mov edi, dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
push eax
push eax
push str.CommonProgramW6432
mov byte [ebp - 4], 3
call edi
mov esi, eax
test esi, esi
je 0x477677
xorps xmm0, xmm0
mov dword [ebp - 0xf0], 0
movq qword [ebp - 0xf8], xmm0
mov dword [ebp - 0xf8], 0
mov dword [ebp - 0xf4], 0
mov dword [ebp - 0xf0], 0
lea eax, [esi + 1]
mov byte [ebp - 4], 4
push eax
lea ecx, [ebp - 0xf8]
call fcn.0047b760
push esi
mov esi, dword [ebp - 0xf8]
push esi
push str.CommonProgramW6432
call edi
push esi
lea ecx, [ebp - 0xe4]
call fcn.0040b8c0
lea ecx, [ebp - 0xf8]
mov byte [ebp - 4], 3
call fcn.004247a0
jmp 0x477723
mov dword [ebp - 0xac], 0
lea eax, [ebp - 0xac]
mov dword [ebp - 4], 5
push eax
push 0
push 0
push 0x53102c
call sub.SHELL32.dll_SHGetKnownFolderPath
test eax, eax
jns 0x4776fd
push 0
mov ecx, ebx
call fcn.004076f0
mov eax, dword [ebp - 0xac]
mov dword [ebp - 0xec], 1
mov byte [ebp - 4], 3
test eax, eax
je 0x4776c9
push eax
call dword [sym.imp.ole32.dll_CoTaskMemFree]
lea ecx, [ebp - 0xe4]
mov dword [ebp - 0xac], 0
call fcn.004087d0
lea ecx, [ebp - 0xcc]
mov byte [ebp - 4], 1
call fcn.0040dfb0
lea ecx, [ebp - 0xc4]
call fcn.004087d0
jmp 0x4777f5
push dword [ebp - 0xac]
lea ecx, [ebp - 0xe4]
call fcn.0040b8c0
mov eax, dword [ebp - 0xac]
mov byte [ebp - 4], 3
test eax, eax
je 0x477723
push eax
call dword [sym.imp.ole32.dll_CoTaskMemFree]
cmp dword [ebp - 0xd4], 0
jne 0x47776c
push 0x52d9b8
mov ecx, ebx
call fcn.004076f0
lea ecx, [ebp - 0xe4]
mov dword [ebp - 0xec], 1
call fcn.004087d0
lea ecx, [ebp - 0xcc]
mov byte [ebp - 4], 1
call fcn.0040dfb0
lea ecx, [ebp - 0xc4]
call fcn.004087d0
jmp 0x4777f5
push 0xffffffffffffffff
push 0
lea eax, [ebp - 0xe4]
push eax
push 1
lea ecx, [ebp - 0xc4]
call fcn.0042e060
lea ecx, [ebp - 0xe4]
mov byte [ebp - 4], 2
call fcn.004087d0
lea eax, [ebp - 0xc4]
push eax
push ebx
call fcn.0047b650
add esp, 8
jmp 0x4777c5
xor eax, eax
mov dword [ebx + 0x14], 7
push eax
mov dword [ebx + 0x10], 0
mov ecx, ebx
push 0x52d9b8
mov word [ebx], ax
call fcn.00407750
lea ecx, [ebp - 0xcc]
mov dword [ebp - 0xec], 1
mov byte [ebp - 4], 1
call fcn.0040dfb0
cmp dword [ebp - 0xb0], 8
jb 0x4777f5
push dword [ebp - 0xc4]
call fcn.004085be
add esp, 4
mov eax, ebx
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.00401590
mov esp, ebp
pop ebp
ret