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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x55e247
mov eax, dword fs:[0]
push eax
sub esp, 0xe8
mov eax, dword [0x5c7cec]
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 - 0xb4], 0
push eax
push 0x569908
mov dword [ebp - 0xb0], 7
mov word [ebp - 0xc4], ax
call fcn.00408740
push 0x20119
lea eax, [ebp - 0xa8]
mov dword [ebp - 4], 0
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 - 0xd8]
movq qword [ebp - 0xd8], xmm0
call fcn.0040b870
push 0x400
lea ecx, [ebp - 0xc4]
mov byte [ebp - 4], 1
mov dword [ebp - 0xf4], 0x400
call fcn.00410930
push 0
push 0x3ff
lea ecx, [ebp - 0xc4]
call fcn.00483d80
cmp dword [ebp - 0xb0], 8
lea ecx, [ebp - 0xf4]
push 0
push ecx
lea eax, [ebp - 0xc4]
cmovae eax, dword [ebp - 0xc4]
lea ecx, [ebp - 0xd8]
push eax
push 0
call fcn.0042f970
test eax, eax
jne 0x496b63
cmp dword [ebp - 0xb4], eax
je 0x496b63
cmp dword [ebp - 0xb0], 8
lea ecx, [ebp - 0xc4]
cmovae ecx, dword [ebp - 0xc4]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x496895
sub ecx, edx
sar ecx, 1
push 0
push ecx
lea ecx, [ebp - 0xc4]
call fcn.00483d80
mov edi, dword [ebp - 0xb0]
lea eax, [ebp - 0xc4]
mov esi, dword [ebp - 0xb4]
cmp edi, 8
push 0x14
cmovae eax, dword [ebp - 0xc4]
push str._CommonProgramFiles_
push 0
push esi
push eax
call fcn.0040f0b0
add esp, 0x14
cmp eax, 0xffffffff
je 0x496b0e
push 0x14
push eax
lea ecx, [ebp - 0xc4]
call fcn.0042a9c0
xor eax, eax
mov dword [ebp - 0xe0], 0
mov dword [ebp - 0xdc], 7
mov word [ebp - 0xf0], ax
push eax
push eax
push str.CommonProgramW6432
mov byte [ebp - 4], 4
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov esi, eax
test esi, esi
je 0x496a08
xorps xmm0, xmm0
mov dword [ebp - 0xc8], 0
movq qword [ebp - 0xd0], xmm0
mov dword [ebp - 0xd0], 0
mov dword [ebp - 0xcc], 0
mov dword [ebp - 0xc8], 0
lea eax, [ebp - 0xd0]
mov byte [ebp - 4], 5
push eax
lea eax, [esi + 1]
push eax
lea ecx, [ebp - 0xd0]
call fcn.00492910
push esi
push dword [ebp - 0xd0]
push str.CommonProgramW6432
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov edx, dword [ebp - 0xd0]
mov ecx, edx
lea esi, [ecx + 2]
nop word [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4969a0
sub ecx, esi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0xf0]
call fcn.00408740
mov ecx, dword [ebp - 0xd0]
mov byte [ebp - 4], 6
test ecx, ecx
je 0x496aa6
mov eax, dword [ebp - 0xc8]
sub eax, ecx
sar eax, 1
lea edx, [eax + eax]
mov eax, ecx
cmp edx, 0x1000
jb 0x4969f9
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x496bb7
push edx
push ecx
call fcn.004097e6
add esp, 8
jmp 0x496aa6
mov dword [ebp - 0xac], 0
lea eax, [ebp - 0xac]
mov dword [ebp - 4], 7
push eax
push 0
push 0
push 0x57079c
call sub.SHELL32.dll_SHGetKnownFolderPath
test eax, eax
jns 0x496a6a
push 0
mov ecx, ebx
call fcn.0040d7b0
mov eax, dword [ebp - 0xac]
mov byte [ebp - 4], 9
test eax, eax
je 0x496a50
push eax
call dword [sym.imp.ole32.dll_CoTaskMemFree]
lea ecx, [ebp - 0xf0]
mov dword [ebp - 0xac], 0
call fcn.00408e50
jmp 0x496b83
mov eax, dword [ebp - 0xac]
mov edx, eax
lea esi, [edx + 2]
mov cx, word [edx]
add edx, 2
test cx, cx
jne 0x496a75
sub edx, esi
lea ecx, [ebp - 0xf0]
sar edx, 1
push edx
push eax
call fcn.00408740
mov eax, dword [ebp - 0xac]
mov byte [ebp - 4], 0xa
test eax, eax
je 0x496aa6
push eax
call dword [sym.imp.ole32.dll_CoTaskMemFree]
mov ecx, dword [ebp - 0xe0]
mov byte [ebp - 4], 4
test ecx, ecx
jne 0x496ad0
push 0x569908
mov ecx, ebx
call fcn.0040d7b0
lea ecx, [ebp - 0xf0]
call fcn.00408e50
jmp 0x496b83
cmp dword [ebp - 0xdc], 8
lea eax, [ebp - 0xf0]
push ecx
cmovae eax, dword [ebp - 0xf0]
lea ecx, [ebp - 0xc4]
push eax
push 1
call fcn.0043c680
lea ecx, [ebp - 0xf0]
mov byte [ebp - 4], 1
call fcn.00408e50
mov edi, dword [ebp - 0xb0]
mov esi, dword [ebp - 0xb4]
cmp esi, 2
jb 0x496b53
mov ecx, dword [ebp - 0xc4]
lea eax, [ebp - 0xc4]
cmp edi, 8
cmovae eax, ecx
cmp word [eax], 0x22
jne 0x496b53
cmp edi, 8
lea eax, [ebp - 0xc4]
cmovae eax, ecx
cmp word [eax + esi*2 - 2], 0x22
jne 0x496b53
lea eax, [esi - 2]
push eax
push 1
push ebx
lea ecx, [ebp - 0xc4]
call fcn.00408d90
jmp 0x496b83
lea eax, [ebp - 0xc4]
mov ecx, ebx
push eax
call fcn.00409a20
jmp 0x496b83
xor eax, eax
mov dword [ebx + 0x10], 0
push eax
mov dword [ebx + 0x14], 7
mov ecx, ebx
push 0x569908
mov word [ebx], ax
call fcn.00408740
lea ecx, [ebp - 0xd8]
call fcn.0040b8f0
lea ecx, [ebp - 0xc4]
call fcn.00408e50
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.0040154f
mov esp, ebp
pop ebp
ret
call fcn.0052cae1
int3