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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x44103c
mov eax, dword fs:[0]
push eax
mov eax, 0x10234
call fcn.00438620
mov eax, dword [0x45066c]
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
push 0x100
lea eax, [ebp - 0x110]
push eax
push str.APPDATA
mov esi, ecx
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
xor ebx, ebx
mov dword [ebp - 0x118], 0xf
mov dword [ebp - 0x11c], ebx
mov byte [ebp - 0x12c], bl
lea eax, [ebp - 0x110]
mov dword [ebp - 4], ebx
lea edx, [eax + 1]
nop
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x416550
sub eax, edx
push eax
lea ecx, [ebp - 0x110]
push ecx
lea ecx, [ebp - 0x12c]
call fcn.004099f0
push 0x19
push str.SogouExplorerconfig.xml
lea ecx, [ebp - 0x12c]
call fcn.004099f0
mov eax, dword [ebp - 0x12c]
mov edi, 0x10
cmp dword [ebp - 0x118], edi
jae 0x416597
lea eax, [ebp - 0x12c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
je 0x4168da
mov ecx, dword [ebp - 0x12c]
cmp dword [ebp - 0x118], edi
jae 0x4165ba
lea ecx, [ebp - 0x12c]
lea edi, [ebp - 0x1018c]
call fcn.00416e90
lea edx, [ebp - 0x1013c]
mov eax, edx
neg eax
and eax, 3
lea eax, [ebp + eax - 0x1013c]
lea ecx, [ebp - 0x13c]
mov dword [ebp - 0x10178], ebx
mov dword [ebp - 0x10174], ebx
mov dword [ebp - 0x10168], ebx
mov dword [ebp - 0x10164], ebx
mov dword [ebp - 0x10160], ebx
mov dword [ebp - 0x10158], ebx
mov dword [ebp - 0x13c], ebx
mov dword [ebp - 0x138], ebx
mov dword [ebp - 0x10148], edx
mov dword [ebp - 0x10144], eax
mov dword [ebp - 0x10140], ecx
mov byte [ebp - 4], 2
mov edx, dword [ebp - 0x1018c]
push edx
lea edi, [ebp - 0x10178]
call fcn.00418b80
mov eax, dword [ebp - 0x10160]
mov dword [ebp - 0x10190], eax
cmp eax, ebx
je 0x4168b8
mov edi, dword [eax + 0x18]
mov dword [ebp - 0x1017c], edi
cmp edi, ebx
je 0x4168b8
push edi
mov ebx, str.homepage
call fcn.00417100
xor ebx, ebx
cmp eax, ebx
je 0x416676
mov edx, eax
mov ecx, edi
call fcn.00417210
lea eax, [ebp - 0x10148]
push eax
mov eax, str.homepage
call fcn.004173e0
cmp dword [esi + 0x14], 0x10
mov edi, eax
jb 0x416693
mov eax, dword [esi]
jmp 0x416695
mov eax, esi
lea ecx, [ebp - 0x10148]
push ecx
call fcn.004173e0
push eax
lea esi, [ebp - 0x10148]
call fcn.00417320
mov esi, dword [ebp - 0x1017c]
cmp dword [esi + 0x20], ebx
je 0x4166c6
mov edx, dword [esi + 0x24]
mov dword [eax + 0x14], edx
mov ecx, dword [esi + 0x24]
mov dword [ecx + 0x18], eax
jmp 0x4166cc
mov dword [eax + 0x14], ebx
mov dword [esi + 0x20], eax
mov dword [esi + 0x24], eax
mov dword [eax + 0x18], ebx
push esi
mov ebx, str.homepagetype
mov dword [eax + 0x10], esi
call fcn.00417100
xor ebx, ebx
cmp eax, ebx
je 0x4166ef
mov edx, eax
mov ecx, esi
call fcn.00417210
lea edx, [ebp - 0x10148]
push edx
mov eax, str.homepagetype
call fcn.004173e0
mov edi, eax
lea eax, [ebp - 0x10148]
push eax
mov eax, 0x447434
call fcn.004173e0
push eax
lea esi, [ebp - 0x10148]
call fcn.00417320
mov esi, dword [ebp - 0x1017c]
cmp dword [esi + 0x20], ebx
je 0x416738
mov ecx, dword [esi + 0x24]
mov dword [eax + 0x14], ecx
mov edx, dword [esi + 0x24]
mov dword [edx + 0x18], eax
jmp 0x41673e
mov dword [eax + 0x14], ebx
mov dword [esi + 0x20], eax
mov dword [esi + 0x24], eax
mov dword [eax + 0x18], ebx
push esi
mov ebx, str.startpageinitdisplaycount
mov dword [eax + 0x10], esi
call fcn.00417100
xor ebx, ebx
cmp eax, ebx
je 0x416761
mov edx, eax
mov ecx, esi
call fcn.00417210
lea eax, [ebp - 0x10148]
push eax
mov eax, str.startpageinitdisplaycount
call fcn.004173e0
lea ecx, [ebp - 0x10148]
mov edi, eax
push ecx
mov eax, 0x447454
call fcn.004173e0
push eax
lea esi, [ebp - 0x10148]
call fcn.00417320
mov ecx, dword [ebp - 0x1017c]
cmp dword [ecx + 0x20], ebx
je 0x4167aa
mov edx, dword [ecx + 0x24]
mov dword [eax + 0x14], edx
mov edx, dword [ecx + 0x24]
mov dword [edx + 0x18], eax
jmp 0x4167b0
mov dword [eax + 0x14], ebx
mov dword [ecx + 0x20], eax
mov dword [ecx + 0x24], eax
mov dword [eax + 0x10], ecx
mov dword [eax + 0x18], ebx
lea eax, [ebp - 0x10148]
push eax
mov eax, str.xml_version_1.0__encoding_utf_8_
call fcn.004173e0
push 7
mov edi, eax
lea esi, [ebp - 0x10148]
call fcn.00417280
mov edx, dword [ebp - 0x10190]
lea ecx, [ebp - 0x10178]
call fcn.00417180
mov eax, dword [ebp - 0x12c]
mov edi, 0x10
cmp dword [ebp - 0x118], edi
jae 0x416803
lea eax, [ebp - 0x12c]
push eax
lea ecx, [ebp - 0x10240]
push ecx
call fcn.00417430
push ebx
push ebx
lea edx, [ebp - 0x10178]
push edx
lea ecx, [ebp - 0x10240]
xor eax, eax
push ecx
push eax
lea eax, [ebp - 0x10194]
push eax
mov byte [ebp - 4], 3
call fcn.004197b0
add esp, 0x18
lea esi, [ebp - 0x10240]
call fcn.00417640
lea ecx, [ebp - 0x101e0]
mov byte [ebp - 4], 2
call fcn.00417590
lea ecx, [ebp - 0x101e0]
push ecx
mov dword [ebp - method.std::ios_base.virtual_0], vtable.std::ios_base.0
call fcn.00422784
add esp, 4
lea esi, [ebp - 0x10148]
mov byte [ebp - 4], 1
call fcn.004182c0
mov eax, dword [ebp - 0x1018c]
cmp eax, ebx
je 0x41688b
push eax
call fcn.004233f0
add esp, 4
mov dword [ebp - 0x1018c], ebx
mov dword [ebp - 0x10188], ebx
mov dword [ebp - 0x10184], ebx
cmp dword [ebp - 0x118], edi
jb 0x4168b4
mov edx, dword [ebp - 0x12c]
push edx
call fcn.004233f0
add esp, 4
mov al, 1
jmp 0x4168f4
lea esi, [ebp - 0x10148]
mov byte [ebp - 4], 1
call fcn.004182c0
mov eax, dword [ebp - 0x1018c]
cmp eax, ebx
je 0x4168da
push eax
call fcn.004233f0
add esp, 4
cmp dword [ebp - 0x118], 0x10
jb 0x4168f2
mov eax, dword [ebp - 0x12c]
push eax
call fcn.004233f0
add esp, 4
xor al, al
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.0042304b
mov esp, ebp
pop ebp
ret