Function at 0x10031870
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x1012f469
mov eax, dword fs:[0]
push eax
sub esp, 0x148
mov eax, dword [0x101636d0]
xor eax, esp
mov dword [esp + 0x140], eax
push ebx
push esi
push edi
mov eax, dword [0x101636d0]
xor eax, esp
push eax
lea eax, [esp + 0x158]
mov dword fs:[0], eax
mov esi, dword [ebp + 8]
mov ebx, ecx
mov dword [esp + 0x14], esi
test esi, esi
je 0x10031bc2
mov eax, dword [ebx + 0x13c]
push eax
call fcn.1007d850
mov dword [ebx + 0x128], esi
call fcn.100680e0
cmp word [eax + 0x4d4], 0
lea edi, [eax + 0x4d4]
jne 0x10031910
push edi
push 0
push 0
push 0x23
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
test eax, eax
je 0x10031910
push edi
push 1
push 0
push 0x23
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
test eax, eax
je 0x10031910
xor edi, edi
push edi
lea edi, [esp + 0x28]
call fcn.10062630
push 0x1013c82c
xor edi, edi
push 0x1013c7e4
lea edx, [esp + 0x2c]
mov dword [esp + 0x168], edi
call fcn.10062cd0
push str.SogouInputComponentsPicfaceDownload
push 0x1013c7e4
lea edx, [esp + 0x34]
call fcn.10062cd0
add esp, 0x10
cmp byte [esi + 0x39c], 0
je 0x1003195d
add esi, 0x28c
jmp 0x10031963
mov esi, dword [esi + 0x288]
push 0x1013c82c
push 0x1013c7e4
lea edx, [esp + 0x2c]
call fcn.10062cd0
add esi, 4
push esi
push 0x1013c7e4
lea edx, [esp + 0x34]
call fcn.10062cd0
push 0x1013c768
push 0x1013c7e4
lea edx, [esp + 0x3c]
call fcn.10062cd0
add esp, 0x18
mov dword [esp + 0x1c], edi
call fcn.100025a0
mov eax, dword [eax + 0x20]
mov dword [esp + 0x18], eax
cmp eax, edi
je 0x10031b9b
cmp dword [eax + 0x1d0], edi
je 0x10031b9b
mov eax, dword [eax + 0x1d0]
mov edx, dword [eax]
mov edx, dword [edx + 0xd4]
lea ecx, [esp + 0x1c]
push ecx
push 4
mov ecx, eax
call edx
mov eax, dword [esp + 0x1c]
cmp eax, edi
je 0x10031b72
cmp dword [eax + 4], edi
lea esi, [eax + 4]
mov dword [esp + 0x20], eax
jle 0x10031a22
mov eax, dword [esp + 0x20]
mov ecx, dword [eax]
mov eax, dword [ecx + edi*4]
mov edx, dword [esp + 0x14]
add eax, 0x280
push eax
add edx, 0x280
lea ecx, [esp + 0x28]
call fcn.10031c10
test al, al
jne 0x10031ae0
inc edi
cmp edi, dword [esi]
jl 0x100319f3
mov eax, dword [ebx + 0x138]
test eax, eax
je 0x10031a5a
mov ecx, dword [eax + 0x170]
mov byte [eax + 0x2c9], 0
test ecx, ecx
je 0x10031a49
mov edx, dword [eax + 0x2b0]
mov dword [ecx + 0x140], edx
mov byte [eax + 0x64], 1
mov eax, dword [ebx + 0x138]
mov byte [eax + 0x13d], 0
mov ecx, dword [esp + 0x14]
mov eax, dword [ecx + 0x140]
lea edx, [eax + eax*2]
mov eax, dword [ecx + 0x144]
lea ecx, [eax + edx*2]
test ecx, ecx
jl 0x10031b7d
mov eax, dword [esp + 0x18]
cmp dword [eax + 0x1c4], 0
je 0x10031b7d
mov edx, dword [eax + 0x1c8]
mov eax, dword [edx + 0x120]
test eax, eax
je 0x10031b7d
cmp dword [eax + 0x218], ecx
jle 0x10031b7d
mov eax, dword [eax + 0x214]
mov edi, dword [eax + ecx*4]
test edi, edi
je 0x10031b72
push 0x170
call fcn.100cfcae
add esp, 4
mov dword [esp + 0x18], eax
mov byte [esp + 0x160], 1
test eax, eax
je 0x10031b21
mov esi, eax
call fcn.100313e0
jmp 0x10031b23
mov eax, dword [ebx + 0x138]
test eax, eax
je 0x10031a5a
mov ecx, dword [eax + 0x170]
mov byte [eax + 0x2c9], 1
test ecx, ecx
je 0x10031b0b
mov edx, dword [eax + 0x2b4]
mov dword [ecx + 0x140], edx
mov byte [eax + 0x64], 1
mov eax, dword [ebx + 0x138]
mov byte [eax + 0x13d], 1
jmp 0x10031a5a
xor eax, eax
mov byte [esp + 0x160], 0
mov esi, eax
mov dword [ebx + 0x13c], eax
call fcn.10031430
mov eax, dword [ebx + 0x13c]
push ebx
mov cl, 1
call fcn.1007d6a0
mov eax, dword [ebx + 0x13c]
push 1
mov byte [eax + 0x72], 0
mov byte [eax + 0x73], 0
mov ecx, dword [ebx + 0x13c]
push 1
call fcn.1007d4e0
mov ebx, dword [ebx + 0x13c]
mov edx, dword [ebx]
mov eax, dword [edx + 8]
mov ecx, ebx
call eax
lea ecx, [esp + 0x24]
call fcn.1005f910
jmp 0x10031bc2
cmp byte [esp + 0x140], 0
mov dword [esp + 0x24], vtable.t_str.0
jne 0x10031bc2
mov eax, dword [esp + 0x2c]
lea ecx, [esp + 0x30]
cmp eax, ecx
jmp 0x10031bb7
cmp byte [esp + 0x140], 0
mov dword [esp + 0x24], vtable.t_str.0
jne 0x10031bc2
mov eax, dword [esp + 0x2c]
lea edx, [esp + 0x30]
cmp eax, edx
je 0x10031bc2
push eax
call fcn.100cf89b
add esp, 4
mov ecx, dword [esp + 0x158]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x140]
xor ecx, esp
call fcn.100cf604
mov esp, ebp
pop ebp
ret 0x14