Function at 0x418720
Capabilities:
Check if file exists
Query environment variable

Disassembly:
push 0xffffffffffffffff
push 0x462518
mov eax, dword fs:[0]
push eax
sub esp, 0x30
push ebx
push ebp
push esi
push edi
mov eax, dword [0x47dac0]
xor eax, esp
push eax
lea eax, [esp + 0x44]
mov dword fs:[0], eax
mov eax, dword [esp + 0x54]
mov ecx, dword [eax + 4]
mov eax, dword [ecx - 0xc]
xor ebx, ebx
cmp eax, ebx
je 0x418862
call fcn.004268df
xor ecx, ecx
cmp eax, ebx
setne cl
cmp ecx, ebx
jne 0x418775
push 0x80004005
call fcn.00401820
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
lea esi, [eax + 0x10]
mov dword [esp + 0x1c], esi
mov dword [esp + 0x4c], ebx
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, 0x104
or eax, ecx
jge 0x4187af
push 0x104
lea ecx, [esp + 0x20]
call fcn.004018a0
mov esi, dword [esp + 0x1c]
push 0x104
push esi
push str.APPDATA
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
cmp esi, ebx
jne 0x4187c8
xor eax, eax
jmp 0x4187e5
mov eax, esi
lea edx, [eax + 2]
lea ecx, [ecx]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x4187d0
sub eax, edx
sar eax, 1
js 0x418d6a
cmp eax, dword [esi - 8]
jg 0x418d6a
push 0x19
mov dword [esi - 0xc], eax
push str.SogouExplorerconfig.xml
lea ecx, [esp + 0x24]
mov word [esi + eax*2], bx
call fcn.0040b6c0
mov ebp, dword [esp + 0x1c]
push ebp
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x41883e
mov dword [esp + 0x18], ebx
lea edi, [esp + 0x18]
mov byte [esp + 0x4c], 1
call fcn.00419ff0
cmp eax, ebx
jge 0x418878
mov byte [esp + 0x4c], bl
mov eax, dword [esp + 0x18]
cmp eax, ebx
je 0x41883e
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov dword [esp + 0x4c], 0xffffffff
lea eax, [ebp - 0x10]
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x418862
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x44]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x3c
ret 4
mov eax, dword [esp + 0x18]
cmp eax, ebx
jne 0x41888e
push 0x80004003
call fcn.00460050
mov eax, dword [esp + 0x18]
mov ecx, dword [eax]
mov edx, dword [ecx + 0xfc]
push ebx
push eax
mov esi, eax
call edx
cmp eax, ebx
jge 0x4188ac
push 0x46fc6c
push esi
push eax
call fcn.00460060
mov eax, dword [ebp - 0xc]
push eax
push ebp
mov ebp, dword [sym.imp.OLEAUT32.dll_SysReAllocStringLen]
call ebp
cmp eax, ebx
jne 0x4188c2
call fcn.00401970
push eax
mov word [esp + 0x30], 8
call dword [sym.imp.OLEAUT32.dll_SysReAllocString]
cmp eax, ebx
mov dword [esp + 0x34], eax
jne 0x4188e2
push 0x8007000e
call fcn.00460050
mov byte [esp + 0x4c], 2
cmp dword [esp + 0x18], ebx
jne 0x4188f7
push 0x80004003
call fcn.00460050
mov esi, dword [esp + 0x18]
lea ecx, [esp + 0x2c]
call fcn.004186d0
lea eax, [esp + 0x2c]
push eax
mov byte [esp + 0x50], 1
call dword [sym.imp.OLEAUT32.dll_VariantCopy]
push ecx
mov ecx, esp
mov dword [esp + 0x28], esp
push ecx
mov edi, str.main_Item
call fcn.004182f0
mov byte [esp + 0x50], 3
cmp dword [esp + 0x1c], ebx
jne 0x41893b
push 0x80004003
call fcn.00460050
mov edi, dword [esp + 0x1c]
lea edx, [esp + 0x18]
push edx
mov byte [esp + 0x54], 1
call fcn.00418420
mov byte [esp + 0x4c], 4
mov eax, dword [esp + 0x14]
cmp eax, ebx
jne 0x418983
mov byte [esp + 0x4c], bl
mov eax, dword [esp + 0x18]
cmp eax, ebx
je 0x41896f
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov dword [esp + 0x4c], 0xffffffff
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
jmp 0x418849
mov ecx, dword [eax]
lea edx, [esp + 0x20]
push edx
push eax
mov eax, dword [ecx + 0x44]
call eax
push ecx
mov ecx, esp
mov dword [esp + 0x28], esp
push ecx
mov edi, str.homepage
call fcn.004182f0
mov edi, dword [esp + 0x24]
lea edx, [esp + 0x28]
push edx
call fcn.004184f0
lea edi, [esp + 0x14]
call fcn.00419fa0
mov eax, dword [esp + 0x24]
cmp eax, ebx
je 0x4189c9
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
cmp dword [esp + 0x14], ebx
jne 0x418a6a
push ecx
mov eax, esp
mov dword [esp + 0x2c], esp
push eax
mov edi, str.homepage
call fcn.004182f0
mov byte [esp + 0x50], 5
cmp dword [esp + 0x1c], ebx
jne 0x4189fa
push 0x80004003
call fcn.00460050
mov edi, dword [esp + 0x1c]
lea ecx, [esp + 0x28]
push ecx
mov byte [esp + 0x54], 4
call fcn.00418600
lea ecx, [esp + 0x14]
mov byte [esp + 0x4c], 6
call fcn.0041a060
mov byte [esp + 0x4c], 4
mov eax, dword [esp + 0x24]
cmp eax, ebx
je 0x418a30
mov edx, dword [eax]
push eax
mov eax, dword [edx + 8]
call eax
mov edx, dword [esp + 0x14]
mov esi, dword [esp + 0x20]
lea edi, [esp + 0x24]
call fcn.004185c0
lea edi, [esp + 0x14]
call fcn.00419fa0
mov eax, dword [esp + 0x24]
cmp eax, ebx
je 0x418a5a
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
cmp dword [esp + 0x14], ebx
jne 0x418a6a
push 0x80004003
call fcn.00460050
mov eax, dword [esp + 0x54]
mov eax, dword [eax]
mov ecx, dword [eax - 0xc]
mov esi, dword [esp + 0x14]
push ecx
push eax
call ebp
cmp eax, ebx
jne 0x418a84
call fcn.00401970
mov ecx, dword [esi]
mov edx, dword [ecx + 0x6c]
push eax
push esi
call edx
push ecx
mov eax, esp
mov dword [esp + 0x2c], esp
push eax
mov edi, str.homepagetype
call fcn.004182f0
mov edi, dword [esp + 0x24]
lea ecx, [esp + 0x28]
push ecx
call fcn.004184f0
lea edi, [esp + 0x14]
call fcn.00419fa0
mov eax, dword [esp + 0x24]
cmp eax, ebx
je 0x418ac6
mov edx, dword [eax]
push eax
mov eax, dword [edx + 8]
call eax
cmp dword [esp + 0x14], ebx
jne 0x418b67
push ecx
mov ecx, esp
mov dword [esp + 0x2c], esp
push ecx
mov edi, str.homepagetype
call fcn.004182f0
mov byte [esp + 0x50], 7
cmp dword [esp + 0x1c], ebx
jne 0x418af7
push 0x80004003
call fcn.00460050
mov edi, dword [esp + 0x1c]
lea edx, [esp + 0x28]
push edx
mov byte [esp + 0x54], 4
call fcn.00418600
lea ecx, [esp + 0x14]
mov byte [esp + 0x4c], 8
call fcn.0041a060
mov byte [esp + 0x4c], 4
mov eax, dword [esp + 0x24]
cmp eax, ebx
je 0x418b2d
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov edx, dword [esp + 0x14]
mov esi, dword [esp + 0x20]
lea edi, [esp + 0x24]
call fcn.004185c0
lea edi, [esp + 0x14]
call fcn.00419fa0
mov eax, dword [esp + 0x24]
cmp eax, ebx
je 0x418b57
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
cmp dword [esp + 0x14], ebx
jne 0x418b67
push 0x80004003
call fcn.00460050
mov esi, dword [esp + 0x14]
push 0x46f654
lea ecx, [esp + 0x28]
call fcn.00401af0
mov byte [esp + 0x4c], 9
mov eax, dword [eax]
mov ecx, dword [eax - 0xc]
push ecx
push eax
call ebp
cmp eax, ebx
jne 0x418b90
call fcn.00401970
mov ecx, dword [esi]
mov edx, dword [ecx + 0x6c]
push eax
push esi
call edx
mov byte [esp + 0x4c], 4
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x418bbe
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push ecx
mov ecx, esp
mov dword [esp + 0x2c], esp
push ecx
mov edi, 0x46f658
call fcn.004182f0
mov edi, dword [esp + 0x24]
lea edx, [esp + 0x28]
push edx
call fcn.004184f0
lea edi, [esp + 0x14]
call fcn.00419fa0
mov eax, dword [esp + 0x24]
cmp eax, ebx
je 0x418bf7
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
cmp dword [esp + 0x14], ebx
jne 0x418c98
push ecx
mov eax, esp
mov dword [esp + 0x2c], esp
push eax
mov edi, 0x46f658
call fcn.004182f0
mov byte [esp + 0x50], 0xa
cmp dword [esp + 0x1c], ebx
jne 0x418c28
push 0x80004003
call fcn.00460050
mov edi, dword [esp + 0x1c]
lea ecx, [esp + 0x28]
push ecx
mov byte [esp + 0x54], 4
call fcn.00418600
lea ecx, [esp + 0x14]
mov byte [esp + 0x4c], 0xb
call fcn.0041a060
mov byte [esp + 0x4c], 4
mov eax, dword [esp + 0x24]
cmp eax, ebx
je 0x418c5e
mov edx, dword [eax]
push eax
mov eax, dword [edx + 8]
call eax
mov edx, dword [esp + 0x14]
mov esi, dword [esp + 0x20]
lea edi, [esp + 0x24]
call fcn.004185c0
lea edi, [esp + 0x14]
call fcn.00419fa0
mov eax, dword [esp + 0x24]
cmp eax, ebx
je 0x418c88
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
cmp dword [esp + 0x14], ebx
jne 0x418c98
push 0x80004003
call fcn.00460050
mov eax, dword [esp + 0x54]
mov eax, dword [eax + 4]
mov ecx, dword [eax - 0xc]
mov esi, dword [esp + 0x14]
push ecx
push eax
call ebp
cmp eax, ebx
jne 0x418cb3
call fcn.00401970
mov ecx, dword [esi]
mov edx, dword [ecx + 0x6c]
push eax
push esi
call edx
mov ecx, dword [esp + 0x1c]
mov eax, dword [ecx - 0xc]
push eax
push ecx
call ebp
cmp eax, ebx
jne 0x418cd0
call fcn.00401970
mov edi, eax
lea esi, [esp + 0x2c]
call fcn.004183e0
mov byte [esp + 0x4c], 0xc
mov ecx, dword [esp + 0x18]
cmp ecx, ebx
jne 0x418cf6
push 0x80004003
call fcn.00460050
mov ecx, dword [esp + 0x18]
mov edi, dword [esp + 0x2c]
mov edx, dword [ecx]
sub esp, 0x10
mov eax, esp
mov dword [eax], edi
mov edi, dword [esp + 0x40]
mov dword [eax + 4], edi
mov edi, dword [esp + 0x44]
mov dword [eax + 8], edi
mov edi, dword [esp + 0x48]
mov dword [eax + 0xc], edi
mov eax, dword [edx + 0x108]
push ecx
mov esi, ecx
call eax
cmp eax, ebx
jge 0x418d33
push 0x46fc6c
push esi
push eax
call fcn.00460060
lea ecx, [esp + 0x2c]
push ecx
mov byte [esp + 0x50], 4
call dword [sym.imp.OLEAUT32.dll_VariantCopy]
lea esi, [esp + 0x18]
call fcn.00419fd0
mov byte [esp + 0x4c], 1
mov eax, dword [esp + 0x14]
cmp eax, ebx
je 0x41895b
mov edx, dword [eax]
push eax
mov eax, dword [edx + 8]
call eax
jmp 0x41895b
push 0x80070057
call fcn.00401820
int3