Function at 0x401790
Capabilities:
Create process on windows
Query environment variable

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x42b1f6
mov eax, dword fs:[0]
push eax
push ecx
mov eax, 0x1cbc
call fcn.00416a70
mov eax, dword [0x433080]
xor eax, esp
mov dword [esp + 0x1cb8], eax
push ebx
push esi
push edi
mov eax, dword [0x433080]
xor eax, esp
push eax
lea eax, [esp + 0x1cd0]
mov dword fs:[0], eax
push 0x206
xor esi, esi
lea ecx, [esp + 0xba]
xor eax, eax
push esi
push ecx
mov word [esp + 0xc0], ax
call fcn.0040fec0
mov edx, dword [0x4342c8]
add esp, 0xc
mov dword [esp + 0x1c], edx
push 0x104
lea eax, [esp + 0xb8]
push eax
push str.PROGRAMFILES
mov dword [esp + 0x1ce4], esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
push str.SogouDownLoadDownLoadDlg.exe
lea ecx, [esp + 0xb8]
push ecx
push str._s_s
mov edx, ecx
push 0x104
push edx
call fcn.0040fa7b
add esp, 0x14
push esi
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
cmp eax, esi
je 0x40185a
mov ecx, dword [eax + 0x3c]
mov eax, dword [ecx + eax + 0x58]
mov dword [esp + 0x14], eax
jmp 0x40185e
mov dword [esp + 0x14], esi
mov edi, dword [esp + 0x14]
mov ecx, edi
and ecx, 0xff000000
cmp ecx, 0x1000000
jne 0x40187b
push 0xe
mov esi, str.game_1
jmp 0x401885
push 0x208
mov esi, str.x400443_18
call fcn.00403180
add esp, 4
push str._ExternalAppInstall
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push str._ExternalAppInstall
mov ebx, eax
lea esi, [esp + 0x20]
call fcn.00401440
test byte [ebp + 8], 2
je 0x401c62
xor edx, edx
push 0x7fe
push edx
lea eax, [esp + 0x4ce]
push eax
mov word [esp + 0x4d0], dx
call fcn.0040fec0
add esp, 0xc
push edi
push str.http:__yz.app.sogou.com_appinfo_num_d
lea ecx, [esp + 0x4cc]
push 0x400
push ecx
call fcn.0040fa7b
mov edx, dword [0x4342c8]
add esp, 0x10
mov dword [esp + 0x18], edx
push 0
push 0x3e8
push ecx
mov byte [esp + 0x1ce4], 1
lea ebx, [esp + 0x4d0]
mov esi, esp
lea edi, [esp + 0x24]
mov dword [esp + 0x2c], esp
call fcn.00401050
mov ecx, edi
call fcn.004049d0
xor ebx, ebx
add esp, 0xc
cmp eax, ebx
jne 0x401967
mov byte [esp + 0x1cd8], bl
mov eax, dword [esp + 0x18]
lea ecx, [eax - 0xc]
cmp ecx, 0x4342b8
je 0x401c62
lea esi, [eax - 0xc]
push esi
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x401c62
push esi
call fcn.0040fbab
add esp, 4
jmp 0x401c62
mov esi, dword [esp + 0x18]
mov eax, dword [esi - 8]
cmp eax, ebx
jle 0x401c52
push str.statustrue
push esi
call fcn.0040fb4b
add esp, 8
cmp eax, ebx
je 0x401c52
sub eax, esi
sar eax, 1
cmp eax, 0xffffffff
je 0x401c52
call fcn.00402fa0
cmp eax, ebx
je 0x401bbf
cmp eax, 0x200001a
jae 0x401bbf
lea esi, [esp + 0x24]
call fcn.00401da0
mov edx, esi
push edx
lea eax, [esp + 0x1c]
push eax
mov byte [esp + 0x1ce0], 4
call fcn.00403580
push 0x7fe
lea edx, [esp + 0x14d2]
xor ecx, ecx
push ebx
push edx
mov word [esp + 0x14d8], cx
call fcn.0040fec0
add esp, 0x14
push 0x7fe
lea ecx, [esp + 0xcca]
xor eax, eax
push ebx
push ecx
mov word [esp + 0xcd0], ax
call fcn.0040fec0
add esp, 0xc
push 0x206
lea eax, [esp + 0x2c2]
xor edx, edx
push ebx
push eax
mov word [esp + 0x2c8], dx
call fcn.0040fec0
add esp, 0xc
mov ebx, str.softurl
lea esi, [esp + 0x14]
call fcn.00401050
mov ecx, esi
push ecx
lea ecx, [esp + 0x28]
mov byte [esp + 0x1cdc], 5
call fcn.00401e10
mov ecx, dword [eax]
lea edx, [esp + 0x14c4]
push 0x400
push edx
call fcn.00403370
add esp, 8
test eax, eax
sete bl
mov byte [esp + 0x1cd8], 4
call fcn.00401370
test bl, bl
je 0x401ab6
mov byte [esp + 0x1cd8], 6
mov eax, dword [esp + 0x28]
mov ecx, dword [eax]
push eax
push ecx
lea edi, [esp + 0x28]
lea esi, [esp + 0x2c]
call fcn.00402020
mov eax, dword [esp + 0x28]
push eax
call fcn.0040f8eb
add esp, 4
lea esi, [esp + 0x18]
call fcn.00401370
jmp 0x401cb6
mov ebx, str.iconurl
lea esi, [esp + 0x14]
call fcn.00401050
mov ecx, esi
push ecx
lea ecx, [esp + 0x28]
mov byte [esp + 0x1cdc], 7
call fcn.00401e10
mov ecx, dword [eax]
lea edx, [esp + 0xcc4]
push 0x400
push edx
call fcn.00403370
add esp, 8
test eax, eax
sete bl
mov byte [esp + 0x1cd8], 4
call fcn.00401370
test bl, bl
je 0x401b12
mov byte [esp + 0x1cd8], 8
jmp 0x401a86
mov ebx, str.softname
lea esi, [esp + 0x14]
call fcn.00401050
mov ecx, esi
push ecx
lea ecx, [esp + 0x28]
mov byte [esp + 0x1cdc], 9
call fcn.00401e10
mov ecx, dword [eax]
lea edx, [esp + 0x2bc]
push 0x104
push edx
call fcn.00403370
add esp, 8
test eax, eax
sete bl
mov byte [esp + 0x1cd8], 4
call fcn.00401370
test bl, bl
je 0x401b6e
mov byte [esp + 0x1cd8], 0xa
jmp 0x401a86
lea ecx, [esp + 0x2bc]
push ecx
lea edx, [esp + 0xcc8]
push edx
lea eax, [esp + 0x14cc]
push eax
push ecx
push str._DownLoad_windowsname_sulr_sicourl_ssoftname_send
push 0x800
lea edx, [esp + 0x34]
push edx
mov eax, 0x800
call fcn.004012c0
push eax
call fcn.0040fa7b
add esp, 0x1c
lea eax, [esp + 0x1c]
call fcn.00401350
mov byte [esp + 0x1cd8], 0xb
jmp 0x401a86
mov bl, 1
test byte [ebp + 8], bl
je 0x401c17
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0x18]
push edx
mov ecx, str._Install_
call fcn.004015d0
mov edi, eax
lea eax, [esp + 0x1c]
mov byte [esp + 0x1cd8], 2
call fcn.004010b0
lea esi, [esp + 0x14]
mov byte [esp + 0x1cd8], bl
call fcn.00401370
call fcn.00404e70
mov ecx, eax
call fcn.00405000
lea esi, [esp + 0x18]
call fcn.00401370
jmp 0x401cb6
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x18]
push ecx
mov ecx, str._DownLoad_
call fcn.004015d0
mov edi, eax
lea eax, [esp + 0x1c]
mov byte [esp + 0x1cd8], 3
call fcn.004010b0
lea esi, [esp + 0x14]
call fcn.00401370
lea esi, [esp + 0x18]
call fcn.00401370
jmp 0x401cb6
lea esi, [esp + 0x18]
mov byte [esp + 0x1cd8], bl
call fcn.00401370
mov edx, dword [esp + 0x14]
push edx
push str.keynum_d
lea eax, [esp + 0x3c]
push 0x40
push eax
call fcn.0040fa7b
mov eax, 1
add esp, 0x10
test byte [0x435b40], al
jne 0x401ca7
mov ecx, dword [0x4342c8]
or dword [0x435b40], eax
push 0x42b2b0
mov dword [0x435b3c], ecx
call fcn.004100cb
add esp, 4
lea edx, [esp + 0x34]
push edx
mov ecx, 0x435b3c
call fcn.00405170
mov esi, dword [esp + 0x1c]
push 1
push 0
push esi
lea eax, [esp + 0xc0]
push eax
push 0x42f314
push 0
call dword [sym.imp.SHELL32.dll_ShellExecuteW]
cmp eax, 0x20
jge 0x401ce7
push eax
push str.Execute_Dlg_fail__error_Num___d
call fcn.00404740
add esp, 8
lea ecx, [esi - 0xc]
cmp ecx, 0x4342b8
je 0x401d09
add esi, 0xfffffff4
push esi
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x401d09
push esi
call fcn.0040fbab
add esp, 4
mov eax, 1
mov ecx, dword [esp + 0x1cd0]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x1cb8]
xor ecx, esp
call fcn.0040f8f6
mov esp, ebp
pop ebp
ret