Function at 0x421b60
Capabilities:
Check if file exists
Get common file path
Query environment variable
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x496690
mov eax, dword fs:[0]
push eax
sub esp, 0x478
mov eax, dword [0x4d406c]
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, ecx
mov dword [ebp - 0x45c], ebx
mov edx, dword [ebp + 0xc]
mov esi, dword [ebp + 8]
mov dword [ebp - 0x43c], esi
mov dword [ebp - 0x46c], esi
lea ecx, [edx + edx*2]
cmp dword [ebx + ecx*8 + 0x10], 0
lea edi, [ebx + ecx*8]
jne 0x422464
cmp edx, 3
jne 0x421c90
lea eax, [ebp - 0x468]
mov dword [ebp - 0x468], 0
push eax
push 1
push 0
push str.SoftwareSogouExplorer
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x422464
push 0x208
push eax
lea eax, [ebp - 0x218]
mov dword [ebp - 0x45c], 1
push eax
call fcn.0045f220
add esp, 0xc
mov dword [ebp - 0x43c], 0x104
lea eax, [ebp - 0x43c]
push eax
lea eax, [ebp - 0x218]
push eax
lea eax, [ebp - 0x45c]
push eax
push 0
push 0x4b6760
push dword [ebp - 0x468]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x422464
lea ecx, [ebp - 0x218]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x421c51
sub ecx, edx
lea eax, [ebp - 0x218]
sar ecx, 1
push ecx
push eax
lea ecx, [ebx + 0x48]
call fcn.00405220
push 1
push 0x4b9d50
lea ecx, [ebx + 0x48]
call fcn.00404430
push dword [ebp - 0x468]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x422464
test edx, edx
jne 0x421d3b
push 3
lea eax, [ebp - 0x438]
mov ecx, ebx
push eax
call fcn.00421b60
push str.SogouExplorer.exe
lea edx, [ebp - 0x438]
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x458]
call fcn.00422a80
add esp, 4
lea ecx, [ebp - 0x438]
push eax
call fcn.00420380
lea ecx, [ebp - 0x458]
call fcn.004054f0
cmp dword [ebp - 0x424], 8
lea eax, [ebp - 0x438]
cmovae eax, dword [ebp - 0x438]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x421d24
lea eax, [ebp - 0x438]
cmp ebx, eax
je 0x421d24
cmp dword [ebp - 0x424], 8
mov ecx, ebx
push dword [ebp - 0x428]
cmovae eax, dword [ebp - 0x438]
push eax
call fcn.00405220
lea ecx, [ebp - 0x438]
mov dword [ebp - 4], 0xffffffff
call fcn.004054f0
jmp 0x422464
cmp edx, 2
jne 0x421d91
push 0x208
lea eax, [ebp - 0x218]
push 0
push eax
call fcn.0045f220
add esp, 0xc
lea eax, [ebp - 0x218]
push 0x104
push eax
push str._Appdata_SogouExplorer_
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
lea edx, [ebp - 0x218]
lea ecx, [edx + 2]
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x421d76
sub edx, ecx
lea eax, [ebp - 0x218]
lea ecx, [ebx + 0x30]
jmp 0x42245b
cmp edx, 5
jne 0x422243
lea eax, [ebp - 0x484]
push 2
push eax
call fcn.00421ae0
mov ecx, eax
call fcn.00421b60
push str.CommCfg.xml
mov edx, eax
mov dword [ebp - 4], 3
lea ecx, [ebp - 0x458]
call fcn.00404590
add esp, 4
lea ecx, [ebp - 0x484]
mov byte [ebp - 4], 5
call fcn.004054f0
cmp dword [ebp - 0x444], 8
lea eax, [ebp - 0x458]
cmovae eax, dword [ebp - 0x458]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x422227
mov dword [ebp - 0x468], 0
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x458]
cmp dword [ebp - 0x444], 8
lea edx, [ebp - 0x468]
cmovae ecx, dword [ebp - 0x458]
call fcn.0044fdd4
test al, al
je 0x422218
push 4
xorps xmm0, xmm0
mov dword [ebp - 0x428], 0
push str.main
lea ecx, [ebp - 0x438]
movlpd qword [ebp - 0x464], xmm0
mov dword [ebp - 0x424], 0xf
mov byte [ebp - 0x438], 0
call fcn.00404f30
lea eax, [ebp - 0x438]
mov byte [ebp - 4], 7
mov ecx, dword [ebp - 0x468]
push eax
lea eax, [ebp - 0x464]
push eax
call fcn.004218f0
mov byte [ebp - 4], 9
mov edx, dword [ebp - 0x424]
cmp edx, 0x10
jb 0x421ec5
mov ecx, dword [ebp - 0x438]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x421ebb
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x42248c
push edx
push ecx
call fcn.0045cf49
add esp, 8
mov ebx, dword [ebp - 0x464]
test ebx, ebx
je 0x4221ec
push 4
push str.Item
lea ecx, [ebp - 0x438]
mov dword [ebp - 0x428], 0
mov dword [ebp - 0x424], 0xf
mov byte [ebp - 0x438], 0
call fcn.00404f30
lea eax, [ebp - 0x438]
mov byte [ebp - 4], 0xa
push eax
lea eax, [ebp - 0x440]
mov ecx, ebx
push eax
call fcn.004218f0
push eax
lea ecx, [ebp - 0x464]
call fcn.00422510
mov eax, dword [ebp - 0x43c]
add dword [eax], 0xffffffff
jne 0x421f5c
mov edi, dword [ebp - 0x440]
test edi, edi
je 0x421f4c
mov ecx, edi
call fcn.00421780
push 0x60
push edi
call fcn.0045cf49
add esp, 8
push 4
push dword [ebp - 0x43c]
call fcn.0045cf49
add esp, 8
mov byte [ebp - 4], 9
mov edx, dword [ebp - 0x424]
cmp edx, 0x10
jb 0x421f9a
mov ecx, dword [ebp - 0x438]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x421f90
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x422491
push edx
push ecx
call fcn.0045cf49
add esp, 8
mov ebx, dword [ebp - 0x464]
test ebx, ebx
je 0x4221ec
push 0x10
push str.defaultcachepath
lea ecx, [ebp - 0x438]
mov dword [ebp - 0x428], 0
mov dword [ebp - 0x424], 0xf
mov byte [ebp - 0x438], 0
call fcn.00404f30
lea eax, [ebp - 0x438]
mov byte [ebp - 4], 0xb
push eax
lea ecx, [ebx + 0x28]
call fcn.00422b50
mov edi, dword [ebp - 0x438]
mov esi, eax
mov eax, dword [ebx + 0x28]
cmp esi, eax
je 0x42202f
cmp dword [esi + 0x24], 0x10
lea edx, [esi + 0x10]
jb 0x422003
mov edx, dword [esi + 0x10]
cmp dword [ebp - 0x424], 0x10
lea ecx, [ebp - 0x438]
push dword [esi + 0x20]
cmovae ecx, edi
push edx
mov edx, dword [ebp - 0x428]
call fcn.00422d10
shr eax, 0x1f
add esp, 8
test al, al
mov eax, dword [ebx + 0x28]
je 0x422031
mov esi, eax
cmp esi, eax
jne 0x4220b6
mov eax, dword fs:[0x2c]
mov ecx, dword [eax]
mov eax, dword [0x4e0028]
cmp eax, dword [ecx + 4]
jle 0x4220af
push 0x4e0028
call fcn.0045d4bf
add esp, 4
cmp dword [0x4e0028], 0xffffffff
jne 0x4220af
mov byte [ebp - 4], 0xc
mov ecx, 0x4e0010
push 0
push 0x4ba00e
mov dword [0x4e0020], 0
mov dword [0x4e0024], 0xf
mov byte [0x4e0010], 0
call fcn.00404f30
push 0x49b750
call fcn.0045d20c
push 0x4e0028
mov byte [ebp - 4], 0xb
call fcn.0045d475
add esp, 8
mov edx, 0x4e0010
jmp 0x4220b9
lea edx, [esi + 0x28]
push ecx
lea ecx, [ebp - 0x484]
call fcn.0040ad70
mov esi, dword [ebp - 0x45c]
add esp, 4
add esi, 0x78
mov ecx, esi
push eax
call fcn.00420380
lea ecx, [ebp - 0x484]
call fcn.004054f0
mov byte [ebp - 4], 9
mov eax, dword [ebp - 0x424]
cmp eax, 0x10
jb 0x42211e
lea ecx, [eax + 1]
mov eax, edi
cmp ecx, 0x1000
jb 0x422114
mov edi, dword [edi - 4]
add ecx, 0x23
sub eax, edi
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x422496
push ecx
push edi
call fcn.0045cf49
add esp, 8
cmp dword [esi + 0x10], 0
je 0x422139
cmp dword [esi + 0x14], 8
mov ecx, esi
jb 0x42212e
mov ecx, dword [esi]
mov dl, 1
call fcn.0044fff5
test al, al
jne 0x42219e
push 0x208
lea eax, [ebp - 0x218]
push 0
push eax
call fcn.0045f220
add esp, 0xc
lea eax, [ebp - 0x218]
push 0x104
push eax
push str._Appdata_SogouExplorerWebkit
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
mov dl, 1
lea ecx, [ebp - 0x218]
call fcn.0044fff5
test al, al
je 0x42219e
lea ecx, [ebp - 0x218]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x422180
sub ecx, edx
lea eax, [ebp - 0x218]
sar ecx, 1
push ecx
push eax
mov ecx, esi
call fcn.00405220
push esi
mov esi, dword [ebp - 0x46c]
mov ecx, esi
call fcn.00412d60
mov edi, dword [ebp - 0x460]
add dword [edi], 0xffffffff
jne 0x4221d1
mov ecx, ebx
call fcn.00421780
push 0x60
push ebx
call fcn.0045cf49
push 4
push edi
call fcn.0045cf49
add esp, 0x10
lea ecx, [ebp - 0x468]
call fcn.00421ab0
lea ecx, [ebp - 0x458]
call fcn.004054f0
jmp 0x42246c
mov edi, dword [ebp - 0x460]
add dword [edi], 0xffffffff
jne 0x422218
test ebx, ebx
je 0x42220d
mov ecx, ebx
call fcn.00421780
push 0x60
push ebx
call fcn.0045cf49
add esp, 8
push 4
push edi
call fcn.0045cf49
add esp, 8
lea ecx, [ebp - 0x468]
mov byte [ebp - 4], 5
call fcn.00421ab0
push 0x4b6760
mov ecx, esi
call fcn.00405370
lea ecx, [ebp - 0x458]
call fcn.004054f0
jmp 0x42246c
cmp edx, 6
jne 0x4222a5
push 0x208
lea eax, [ebp - 0x218]
push 0
push eax
call fcn.0045f220
add esp, 0xc
lea eax, [ebp - 0x218]
push 0
push 0x10
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
lea eax, [ebp - 0x218]
push eax
lea ecx, [ebp - 0x458]
call fcn.00405370
push 0x4b9f20
lea ecx, [ebp - 0x458]
mov dword [ebp - 4], 0xd
call fcn.00404810
lea ecx, [ebx + 0x90]
jmp 0x4223ea
cmp edx, 7
jne 0x422326
push 0x208
lea eax, [ebp - 0x218]
push 0
push eax
call fcn.0045f220
add esp, 0xc
lea eax, [ebp - 0x218]
push 0
push 0xb
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
lea eax, [ebp - 0x218]
push eax
lea ecx, [ebp - 0x458]
call fcn.00405370
mov dword [ebp - 4], 0xe
call fcn.0044bbae
lea ecx, [ebp - 0x458]
cmp eax, 7
jl 0x422311
push str.Programs_
call fcn.00404810
lea ecx, [ebx + 0xa8]
jmp 0x4223ea
push 0x4b9f78
call fcn.00404810
lea ecx, [ebx + 0xa8]
jmp 0x4223ea
cmp edx, 8
jne 0x422385
push 0x208
lea eax, [ebp - 0x218]
push 0
push eax
call fcn.0045f220
add esp, 0xc
lea eax, [ebp - 0x218]
push 0
push 0xb
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
lea eax, [ebp - 0x218]
push eax
lea ecx, [ebp - 0x458]
call fcn.00405370
push 0x4b9f20
lea ecx, [ebp - 0x458]
mov dword [ebp - 4], 0xf
call fcn.00404810
lea ecx, [ebx + 0xc0]
jmp 0x4223ea
cmp edx, 9
jne 0x42240a
push 0x208
lea eax, [ebp - 0x218]
push 0
push eax
call fcn.0045f220
add esp, 0xc
lea eax, [ebp - 0x218]
push 0x104
push eax
push str._Appdata_MicrosoftInternet_ExplorerQuick_Launch
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
lea eax, [ebp - 0x218]
push eax
lea ecx, [ebp - 0x458]
call fcn.00405370
push 0x4b9f20
lea ecx, [ebp - 0x458]
mov dword [ebp - 4], 0x10
call fcn.00404810
lea ecx, [ebx + 0xd8]
lea eax, [ebp - 0x458]
push eax
call fcn.0040f5e0
lea ecx, [ebp - 0x458]
mov dword [ebp - 4], 0xffffffff
call fcn.004054f0
jmp 0x422464
cmp edx, 0xa
jne 0x422464
push 0x208
lea eax, [ebp - 0x420]
push 0
push eax
call fcn.0045f220
add esp, 0xc
lea eax, [ebp - 0x420]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea edx, [ebp - 0x420]
lea ecx, [edx + 2]
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x422442
sub edx, ecx
lea eax, [ebp - 0x420]
lea ecx, [ebx + 0xf0]
sar edx, 1
push edx
push eax
call fcn.00405220
push edi
mov ecx, esi
call fcn.00412d60
mov eax, esi
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.0045cf38
mov esp, ebp
pop ebp
ret 8
call fcn.004626c9
call fcn.004626c9
call fcn.004626c9
int3