Function at 0x40dcbc
Capabilities:
Check if file exists
Delete file
Move file
Query environment variable
Read .ini file

Disassembly:
push ebp
lea ebp, [esp - 0x1cb8]
mov eax, 0x1cb8
call fcn.004a1280
push 0xffffffffffffffff
push 0x511024
mov eax, dword fs:[0]
push eax
sub esp, 0x48
mov eax, dword [0x551bd0]
xor eax, ebp
mov dword [ebp + 0x1cb4], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 0x18], edi
call fcn.0047ff5d
mov esi, eax
xor ebx, ebx
mov eax, str.DrvInst_64.exe
cmp esi, ebx
jne 0x40dd15
mov eax, str.DrvInst_x86.exe
push eax
lea ecx, [ebp + 0x38]
call fcn.00401685
lea eax, [edi + 0x5c]
push 0x538040
push eax
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0x54]
push eax
mov dword [ebp - 4], ebx
call fcn.00409dbb
lea ecx, [ebp + 0x38]
push ecx
push eax
lea eax, [ebp + 0x1c]
push eax
mov byte [ebp - 4], 1
call fcn.0041214a
add esp, 0x18
push ebx
push 1
lea ecx, [ebp - 0x54]
mov byte [ebp - 4], 3
call fcn.0040184d
xor eax, eax
mov edi, 0x206
push edi
mov word [ebp + 0x1294], ax
lea eax, [ebp + 0x1296]
push ebx
push eax
call fcn.0049d740
neg esi
sbb esi, esi
and esi, 0x20
add esi, 0x20
push esi
lea eax, [ebp + 0x1294]
push str.__Appdata__SogouApkToolDrvInst_d.zip
push eax
mov dword [ebp - 0x14], esi
call fcn.00401e39
xor eax, eax
push edi
mov word [ebp + 0x1aac], ax
lea eax, [ebp + 0x1aae]
push ebx
push eax
call fcn.0049d740
mov esi, dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
add esp, 0x24
push 0x104
lea eax, [ebp + 0x1aac]
push eax
lea eax, [ebp + 0x1294]
push eax
call esi
cmp dword [ebp + 0x34], 8
mov eax, dword [ebp + 0x20]
jae 0x40ddd6
lea eax, [ebp + 0x20]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x40df14
cmp dword [ebp + 0x50], 8
mov eax, dword [ebp + 0x3c]
jae 0x40ddf1
lea eax, [ebp + 0x3c]
push eax
call fcn.0047af06
pop ecx
test al, al
jne 0x40deb4
xor eax, eax
push edi
mov word [ebp + 0x108c], ax
lea eax, [ebp + 0x108e]
push ebx
push eax
call fcn.0049d740
push dword [ebp - 0x14]
lea eax, [ebp + 0x108c]
push str.__Appdata__SogouApkToolDrvInst_dNew.zip
push eax
call fcn.00401e39
xor eax, eax
push edi
mov word [ebp + 0x169c], ax
lea eax, [ebp + 0x169e]
push ebx
push eax
call fcn.0049d740
add esp, 0x24
push 0x104
lea eax, [ebp + 0x169c]
push eax
lea eax, [ebp + 0x108c]
push eax
call esi
lea eax, [ebp + 0x169c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x40deb4
lea eax, [ebp + 0x1aac]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
lea eax, [ebp + 0x1aac]
push eax
lea eax, [ebp + 0x169c]
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileW]
test eax, eax
je 0x40deb4
mov esi, dword [ebp - 0x1c]
cmp dword [esi + 0x18], 8
jb 0x40de9e
mov eax, dword [esi + 4]
jmp 0x40dea1
lea eax, [esi + 4]
push eax
lea eax, [ebp + 0x1aac]
push eax
call fcn.0047ab3d
pop ecx
pop ecx
test eax, eax
jne 0x40df17
mov dword [ebp - 0x14], ebx
call fcn.004063aa
push str.GetDrvInstUpdate
push ebx
lea edx, [ebp - 0x14]
push edx
push dword [ebp - 0x18]
lea ecx, [eax + 0x340]
mov eax, dword [ecx]
push 0x40fb2a
call dword [eax + 0x10]
push ebx
push 1
lea ecx, [ebp + 0x1c]
call fcn.0040184d
push ebx
push 1
lea ecx, [ebp + 0x38]
call fcn.0040184d
mov al, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x1cb4]
xor ecx, ebp
call fcn.0049a49b
add ebp, 0x1cb8
leave
ret
mov esi, dword [ebp - 0x1c]
lea eax, [ebp + 0x1aac]
push eax
mov ecx, str.DPMODULE
call fcn.00417417
pop ecx
cmp eax, ebx
je 0x40df6d
cmp dword [esi + 0x18], 8
jb 0x40df38
mov esi, dword [esi + 4]
jmp 0x40df3b
add esi, 4
lea eax, [ebp + 0x1aac]
push esi
push eax
call fcn.0047ab3d
pop ecx
pop ecx
test eax, eax
jne 0x40df6d
mov byte [ebp - 0xd], 1
push ebx
push 1
lea ecx, [ebp + 0x1c]
call fcn.0040184d
push ebx
push 1
lea ecx, [ebp + 0x38]
call fcn.0040184d
mov al, byte [ebp - 0xd]
jmp 0x40def1
xor eax, eax
push 0x1fe
mov word [ebp + 0x149c], ax
lea eax, [ebp + 0x149e]
push ebx
push eax
call fcn.0049d740
push dword [ebp - 0x14]
lea eax, [ebp + 0x149c]
push str.http:__config.zhushou.sogou.com_driver__platformandroidbit_dtypedrvinstini1
push eax
call fcn.00412195
add esp, 0x18
push 0x535d58
lea ecx, [ebp + 0x54]
call fcn.00401685
mov byte [ebp - 4], 4
call fcn.0041295e
push eax
lea eax, [ebp + 0x54]
push eax
call fcn.00438c18
pop ecx
pop ecx
lea eax, [ebp + 0x149c]
push eax
lea ecx, [ebp + 0x70]
call fcn.00401685
push 0x538dc0
lea eax, [ebp + 0x70]
push eax
lea eax, [ebp - 0x38]
push eax
mov byte [ebp - 4], 5
call fcn.00409dbb
lea ecx, [ebp + 0x54]
push ecx
push eax
lea eax, [ebp - 0x54]
push eax
mov byte [ebp - 4], 6
call fcn.0041214a
add esp, 0x18
push 0xffffffffffffffff
push ebx
push eax
lea ecx, [ebp + 0x70]
mov byte [ebp - 4], 7
call fcn.004019f3
push ebx
push 1
lea ecx, [ebp - 0x54]
call fcn.0040184d
push ebx
push 1
lea ecx, [ebp - 0x38]
mov byte [ebp - 4], 5
call fcn.0040184d
mov esi, dword [ebp - 0x18]
push 0x538dc4
lea eax, [esi + 0x40]
push eax
lea eax, [ebp - 0x38]
push eax
call fcn.00409dbb
add esp, 0xc
push 0xffffffffffffffff
add esi, 0xe8
push ebx
push eax
mov ecx, esi
mov byte [ebp - 4], 8
call fcn.004019f3
push ebx
mov byte [ebp - 4], 5
push 1
lea ecx, [ebp - 0x38]
call fcn.0040184d
cmp dword [esi + 0x18], 8
push ebx
jb 0x40e06d
mov eax, dword [esi + 4]
jmp 0x40e070
lea eax, [esi + 4]
sub esp, 0x1c
mov ecx, esp
mov dword [ebp - 0x18], esp
push eax
call fcn.00401685
mov byte [ebp - 4], 9
cmp dword [ebp + 0x88], 8
mov eax, dword [ebp + 0x74]
jae 0x40e091
lea eax, [ebp + 0x74]
sub esp, 0x1c
mov ecx, esp
mov dword [ebp - 0x14], esp
push eax
call fcn.00401685
mov byte [ebp - 4], 5
call fcn.004099a2
add esp, 0x3c
cmp eax, ebx
jge 0x40e0cd
push ebx
push 1
lea ecx, [ebp + 0x70]
call fcn.0040184d
push ebx
push 1
lea ecx, [ebp + 0x54]
call fcn.0040184d
mov byte [ebp - 0xd], bl
jmp 0x40df52
xor eax, eax
push 0xffe
mov word [ebp + 0x8c], ax
lea eax, [ebp + 0x8e]
push ebx
push eax
call fcn.0049d740
add esp, 0xc
cmp dword [esi + 0x18], 8
jb 0x40e0f6
mov eax, dword [esi + 4]
jmp 0x40e0f9
lea eax, [esi + 4]
push eax
push 0x7ff
lea eax, [ebp + 0x8c]
push eax
push 0x537d6c
push 0x538be8
push str.General
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
lea eax, [ebp + 0x8c]
push 0x537d6c
push eax
call fcn.0049bf35
pop ecx
pop ecx
test eax, eax
je 0x40e0af
xor eax, eax
push edi
mov word [ebp + 0x18a4], ax
lea eax, [ebp + 0x18a6]
push ebx
push eax
call fcn.0049d740
add esp, 0xc
cmp dword [esi + 0x18], 8
jb 0x40e15b
mov eax, dword [esi + 4]
jmp 0x40e15e
lea eax, [esi + 4]
push eax
push 0x103
lea eax, [ebp + 0x18a4]
push eax
mov edi, 0x537d6c
push edi
push 0x538c00
push str.General
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
lea eax, [ebp + 0x18a4]
push edi
push eax
call fcn.0049bf35
pop ecx
pop ecx
test eax, eax
je 0x40e0af
lea eax, [ebp + 0x18a4]
push eax
lea ecx, [ebp]
call fcn.00401685
mov byte [ebp - 4], 0xa
cmp dword [esi + 0x18], 8
jb 0x40e1b6
mov esi, dword [esi + 4]
jmp 0x40e1b9
add esi, 4
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push ebx
lea eax, [ebp]
push eax
lea eax, [ebp - 0x38]
push eax
call fcn.0047c2c2
pop ecx
pop ecx
mov byte [ebp - 4], 0xb
cmp dword [eax + 0x18], 0x10
jb 0x40e1df
mov eax, dword [eax + 4]
jmp 0x40e1e2
add eax, 4
push eax
xor esi, esi
inc esi
push esi
sub esp, 0x1c
lea eax, [ebp + 0x1aac]
mov ecx, esp
mov dword [ebp - 0x18], esp
push eax
call fcn.00401685
push ebx
sub esp, 0x1c
mov byte [ebp - 4], 0xc
lea eax, [ebp + 0x8c]
mov ecx, esp
mov dword [ebp - 0x14], esp
push eax
call fcn.00401685
mov byte [ebp - 4], 0xd
call fcn.004064a6
mov ecx, eax
mov byte [ebp - 4], 0xb
call fcn.0040a332
push ebx
cmp eax, ebx
push esi
lea ecx, [ebp - 0x38]
setne byte [ebp - 0xd]
mov byte [ebp - 4], 0xa
call fcn.004017de
cmp byte [ebp - 0xd], bl
je 0x40e25c
push ebx
push esi
lea ecx, [ebp]
call fcn.0040184d
push ebx
push esi
lea ecx, [ebp + 0x70]
call fcn.0040184d
push ebx
push esi
jmp 0x40e0bd
mov eax, dword [ebp - 0x1c]
cmp dword [eax + 0x18], 8
jb 0x40e26a
mov eax, dword [eax + 4]
jmp 0x40e26d
add eax, 4
push eax
lea eax, [ebp + 0x1aac]
push eax
call fcn.0047ab3d
pop ecx
pop ecx
test eax, eax
jne 0x40e241
push ebx
push esi
lea ecx, [ebp]
call fcn.0040184d
push ebx
push esi
lea ecx, [ebp + 0x70]
call fcn.0040184d
push ebx
push esi
lea ecx, [ebp + 0x54]
call fcn.0040184d
jmp 0x40df4e