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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x52d65c
mov eax, dword fs:[0]
push eax
mov eax, 0x10214
call fcn.00510b10
mov eax, dword [0x588fc8]
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 dword [ebp - 0x10160], ecx
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
call fcn.00420ad8
xor ecx, ecx
xor edi, edi
cmp eax, edi
setne cl
cmp ecx, edi
jne 0x40ff9b
push 0x80004005
call fcn.00401410
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x10158], eax
lea eax, [ebp - 0x110]
mov dword [ebp - 4], edi
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40ffc0
sub eax, edx
push eax
lea ecx, [ebp - 0x110]
push ecx
lea ecx, [ebp - 0x10158]
call fcn.00402fc0
push 0x19
push str.SogouExplorerconfig.xml
lea ecx, [ebp - 0x10158]
call fcn.00402fc0
mov esi, dword [ebp - 0x10158]
mov ebx, 1
cmp dword [esi - 4], ebx
jle 0x410013
mov edx, dword [esi - 0xc]
push edx
lea ecx, [ebp - 0x10158]
call fcn.00401f00
mov esi, dword [ebp - 0x10158]
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
je 0x4104b5
cmp dword [esi - 4], ebx
jle 0x41003c
mov eax, dword [esi - 0xc]
push eax
lea ecx, [ebp - 0x10158]
call fcn.00401f00
mov esi, dword [ebp - 0x10158]
push esi
lea ecx, [ebp - 0x10170]
call fcn.0040f4b0
lea ecx, [ebp - 0x10118]
mov eax, ecx
neg eax
and eax, 3
lea edx, [ebp + eax - 0x10118]
lea eax, [ebp - 0x118]
mov dword [ebp - 0x10154], edi
mov dword [ebp - 0x10150], edi
mov dword [ebp - 0x10144], edi
mov dword [ebp - 0x10140], edi
mov dword [ebp - 0x1013c], edi
mov dword [ebp - 0x10134], edi
mov dword [ebp - 0x118], edi
mov dword [ebp - 0x114], edi
mov dword [ebp - 0x10124], ecx
mov dword [ebp - 0x10120], edx
mov dword [ebp - 0x1011c], eax
mov ecx, dword [ebp - 0x10170]
push ecx
lea ecx, [ebp - 0x10154]
mov byte [ebp - 4], 2
call fcn.0040d610
mov eax, dword [ebp - 0x1013c]
mov dword [ebp - 0x10174], eax
cmp eax, edi
je 0x410481
mov ebx, dword [eax + 0x18]
mov dword [ebp - 0x1015c], ebx
cmp ebx, edi
je 0x410481
push 1
push edi
push str.homepage
mov ecx, ebx
call fcn.00409370
cmp eax, edi
je 0x4100fa
push eax
mov ecx, ebx
call fcn.00408c20
mov eax, str.homepage
nop
inc eax
cmp byte [eax], 0
jne 0x410100
sub eax, str.homepage
lea esi, [eax + 1]
push esi
lea ecx, [ebp - 0x10124]
call fcn.00408d60
mov ebx, eax
cmp esi, edi
jbe 0x410130
mov ecx, str.homepage
sub ecx, ebx
mov dl, byte [ecx + eax]
mov byte [eax], dl
inc eax
dec esi
jne 0x410127
mov ecx, dword [ebp - 0x10160]
mov eax, dword [ecx]
cmp dword [eax - 4], 1
jle 0x410147
mov eax, dword [eax - 0xc]
push eax
call fcn.00401f00
mov ecx, dword [ebp - 0x10160]
mov edi, dword [ecx]
cmp byte [edi], 0
mov eax, edi
je 0x41015c
inc eax
cmp byte [eax], 0
jne 0x410156
sub eax, edi
lea esi, [eax + 1]
push esi
lea ecx, [ebp - 0x10124]
call fcn.00408d60
test esi, esi
je 0x41017e
mov ecx, eax
sub edi, eax
mov dl, byte [edi + ecx]
mov byte [ecx], dl
inc ecx
dec esi
jne 0x410175
push 0
push 0
push eax
push ebx
lea ecx, [ebp - 0x10124]
call fcn.00409500
mov esi, dword [ebp - 0x1015c]
push eax
mov ecx, esi
call fcn.004093f0
push 1
push 0
push str.homepagetype
mov ecx, esi
call fcn.00409370
test eax, eax
je 0x4101b9
push eax
mov ecx, esi
call fcn.00408c20
mov eax, str.homepagetype
mov edi, edi
inc eax
cmp byte [eax], 0
jne 0x4101c0
sub eax, str.homepagetype
lea esi, [eax + 1]
push esi
lea ecx, [ebp - 0x10124]
call fcn.00408d60
mov ebx, eax
test esi, esi
je 0x4101f0
mov ecx, str.homepagetype
sub ecx, ebx
mov dl, byte [ecx + eax]
mov byte [eax], dl
inc eax
dec esi
jne 0x4101e7
mov eax, 0x53cf60
inc eax
cmp byte [eax], 0
jne 0x4101f5
sub eax, 0x53cf60
lea esi, [eax + 1]
push esi
lea ecx, [ebp - 0x10124]
call fcn.00408d60
test esi, esi
je 0x410229
mov edi, 0x53cf60
mov ecx, eax
sub edi, eax
lea esp, [esp]
mov dl, byte [edi + ecx]
mov byte [ecx], dl
inc ecx
dec esi
jne 0x410220
push 0
push 0
push eax
push ebx
lea ecx, [ebp - 0x10124]
call fcn.00409500
mov esi, dword [ebp - 0x1015c]
push eax
mov ecx, esi
call fcn.004093f0
push 1
push 0
push str.sc_video
mov ecx, esi
call fcn.00409370
test eax, eax
jne 0x410306
push 1
push eax
push 0x53e644
mov ecx, esi
call fcn.00409370
test eax, eax
je 0x41027b
push eax
mov ecx, esi
call fcn.00408c20
mov eax, 0x53e644
inc eax
cmp byte [eax], 0
jne 0x410280
sub eax, 0x53e644
lea esi, [eax + 1]
push esi
lea ecx, [ebp - 0x10124]
call fcn.00408d60
mov ebx, eax
test esi, esi
je 0x4102b0
mov ecx, 0x53e644
sub ecx, ebx
mov dl, byte [ecx + eax]
mov byte [eax], dl
inc eax
dec esi
jne 0x4102a7
mov eax, str._1842686907
inc eax
cmp byte [eax], 0
jne 0x4102b5
sub eax, str._1842686907
lea esi, [eax + 1]
push esi
lea ecx, [ebp - 0x10124]
call fcn.00408d60
mov edi, eax
test esi, esi
je 0x4102e9
mov edx, str._1842686907
mov ecx, edi
sub edx, edi
mov edi, edi
mov al, byte [edx + ecx]
mov byte [ecx], al
inc ecx
dec esi
jne 0x4102e0
push 0
push 0
push edi
push ebx
lea ecx, [ebp - 0x10124]
call fcn.00409500
mov ecx, dword [ebp - 0x1015c]
push eax
call fcn.004093f0
mov eax, str.xml_version_1.0__encoding_utf_8_
jmp 0x410310
inc eax
cmp byte [eax], 0
jne 0x410310
sub eax, str.xml_version_1.0__encoding_utf_8_
lea esi, [eax + 1]
push esi
lea ecx, [ebp - 0x10124]
call fcn.00408d60
xor ebx, ebx
mov edi, eax
cmp esi, ebx
jbe 0x410349
mov edx, str.xml_version_1.0__encoding_utf_8_
mov ecx, edi
sub edx, edi
jmp 0x410340
mov al, byte [edx + ecx]
mov byte [ecx], al
inc ecx
dec esi
jne 0x410340
push ebx
push ebx
push ebx
push edi
push 7
lea ecx, [ebp - 0x10124]
call fcn.00409430
mov ecx, dword [ebp - 0x10174]
push eax
push ecx
lea ecx, [ebp - 0x10154]
call fcn.0040b300
mov esi, dword [ebp - 0x10158]
cmp dword [esi - 4], 1
jle 0x41038e
mov edx, dword [esi - 0xc]
push edx
lea ecx, [ebp - 0x10158]
call fcn.00401f00
mov esi, dword [ebp - 0x10158]
push 1
push 0x40
push 2
push esi
lea ecx, [ebp - 0x10220]
call fcn.0040ed70
push ebx
push ebx
lea edx, [ebp - 0x10154]
push edx
lea ecx, [ebp - 0x10220]
xor eax, eax
push ecx
push eax
lea eax, [ebp - 0x10178]
push eax
mov byte [ebp - 4], 3
call fcn.0040eff0
add esp, 0x18
lea ecx, [ebp - 0x1021c]
call fcn.0040d580
test eax, eax
jne 0x4103fe
mov ecx, dword [ebp - 0x10220]
mov ecx, dword [ecx + 4]
mov eax, dword [ebp + ecx - 0x10214]
lea ecx, [ebp + ecx - 0x10220]
or eax, 2
cmp dword [ecx + 0x38], ebx
jne 0x4103f7
or eax, 4
push ebx
push eax
call fcn.004086a0
lea ecx, [ebp - 0x101c0]
mov byte [ebp - 4], 2
call fcn.0040eee0
lea edx, [ebp - 0x101c0]
push edx
mov dword [ebp - method.std::ios_base.virtual_0], vtable.std::ios_base.0
call fcn.0052c136
add esp, 4
lea ecx, [ebp - 0x10124]
mov byte [ebp - 4], 1
call fcn.004096f0
mov eax, dword [ebp - 0x10170]
cmp eax, ebx
je 0x410448
push eax
call fcn.00410636
add esp, 4
lea eax, [esi - 0x10]
mov dword [ebp - 0x10170], ebx
mov dword [ebp - 0x1016c], ebx
mov dword [ebp - 0x10168], ebx
mov dword [ebp - 4], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x41047d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov al, 1
jmp 0x4104da
lea ecx, [ebp - 0x10124]
mov byte [ebp - 4], 1
call fcn.004096f0
mov eax, dword [ebp - 0x10170]
cmp eax, edi
je 0x4104a3
push eax
call fcn.00410636
add esp, 4
mov dword [ebp - 0x10170], edi
mov dword [ebp - 0x1016c], edi
mov dword [ebp - 0x10168], edi
lea eax, [esi - 0x10]
mov dword [ebp - 4], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4104d8
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
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.0050e65d
mov esp, ebp
pop ebp
ret