Function at 0x40d140
Capabilities:
Check if file exists
Delete file
Move file
Query or enumerate registry value

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4ec2ac
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x2f0
mov eax, dword [0x53e01c]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, edx
mov dword [ebp - 0x2fc], esi
mov edi, ecx
mov dword [ebp - 0x2f4], edi
cmp dword [esi + 0x10], 0
mov eax, dword [ebx + 8]
mov dword [ebp - 0x2f8], edi
mov dword [ebp - 0x2f8], eax
jne 0x40d1c4
xor eax, eax
mov dword [edi], 0
mov dword [edi + 0x10], 0
mov dword [edi + 0x14], 7
mov word [edi], ax
jmp 0x40ddc4
push str.kernel32.dll
mov dword [ebp - 0x2f0], 0
mov dword [ebp - 0x2ec], 0
mov dword [ebp - 0x2e8], 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov dword [ebp - 0x2e4], eax
test eax, eax
je 0x40d226
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.Wow64DisableWow64FsRedirection
push eax
call esi
push str.Wow64RevertWow64FsRedirection
push dword [ebp - 0x2e4]
mov dword [ebp - 0x2ec], eax
call esi
mov esi, dword [ebp - 0x2fc]
mov dword [ebp - 0x2e8], eax
jmp 0x40d22c
mov eax, dword [ebp - 0x2e8]
mov ecx, dword [ebp - 0x2ec]
test ecx, ecx
je 0x40d243
test eax, eax
je 0x40d243
lea eax, [ebp - 0x2f0]
push eax
call ecx
mov dword [ebp - 4], 0
xor eax, eax
mov dword [ebp - 0x2c8], 0
mov dword [ebp - 0x2b8], 0
mov dword [ebp - 0x2b4], 7
mov word [ebp - 0x2c8], ax
mov dword [ebp - 0x280], eax
mov dword [ebp - 0x270], eax
mov dword [ebp - 0x26c], 7
mov word [ebp - 0x280], ax
mov dword [ebp - 0x298], eax
mov dword [ebp - 0x288], eax
mov dword [ebp - 0x284], 7
mov word [ebp - 0x298], ax
lea eax, [ebp - 0x298]
mov byte [ebp - 4], 3
push eax
lea eax, [ebp - 0x280]
mov edx, esi
push eax
lea eax, [ebp - 0x2c8]
push eax
lea ecx, [ebp - 0x2e0]
call fcn.0040c950
mov edx, dword [ebp - 0x2cc]
add esp, 0xc
mov esi, dword [eax + 0x10]
cmp edx, 8
jb 0x40d317
mov ecx, dword [ebp - 0x2e0]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40d30d
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40dde4
push edx
push ecx
call fcn.0045b5e1
add esp, 8
test esi, esi
jne 0x40d441
xor eax, eax
mov byte [ebp - 4], 2
mov edx, dword [ebp - 0x284]
mov dword [edi], esi
mov dword [edi + 0x10], esi
mov dword [edi + 0x14], 7
mov word [edi], ax
cmp edx, 8
jb 0x40d374
mov ecx, dword [ebp - 0x298]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40d36a
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40dde9
push edx
push ecx
call fcn.0045b5e1
add esp, 8
xor eax, eax
mov byte [ebp - 4], 1
mov edx, dword [ebp - 0x26c]
mov dword [ebp - 0x288], 0
mov dword [ebp - 0x284], 7
mov word [ebp - 0x298], ax
cmp edx, 8
jb 0x40d3d5
mov ecx, dword [ebp - 0x280]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40d3cb
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40dde9
push edx
push ecx
call fcn.0045b5e1
add esp, 8
xor eax, eax
mov dword [ebp - 0x270], 0
mov byte [ebp - 4], al
mov edx, dword [ebp - 0x2b4]
mov dword [ebp - 0x26c], 7
mov word [ebp - 0x280], ax
cmp edx, 8
jb 0x40d435
mov ecx, dword [ebp - 0x2c8]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40d42b
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40dde9
push edx
push ecx
call fcn.0045b5e1
add esp, 8
mov dword [ebp - 4], 4
jmp 0x40dda9
cmp dword [ebp - 0x26c], 8
lea eax, [ebp - 0x280]
cmovae eax, dword [ebp - 0x280]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x40d584
mov byte [ebp - 4], 2
mov edx, dword [ebp - 0x284]
mov dword [edi], eax
mov dword [edi + 0x10], eax
mov dword [edi + 0x14], 7
mov word [edi], ax
cmp edx, 8
jb 0x40d4b7
mov ecx, dword [ebp - 0x298]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40d4ad
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40dde9
push edx
push ecx
call fcn.0045b5e1
add esp, 8
xor eax, eax
mov byte [ebp - 4], 1
mov edx, dword [ebp - 0x26c]
mov dword [ebp - 0x288], 0
mov dword [ebp - 0x284], 7
mov word [ebp - 0x298], ax
cmp edx, 8
jb 0x40d518
mov ecx, dword [ebp - 0x280]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40d50e
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40dde9
push edx
push ecx
call fcn.0045b5e1
add esp, 8
xor eax, eax
mov dword [ebp - 0x270], 0
mov byte [ebp - 4], al
mov edx, dword [ebp - 0x2b4]
mov dword [ebp - 0x26c], 7
mov word [ebp - 0x280], ax
cmp edx, 8
jb 0x40d578
mov ecx, dword [ebp - 0x2c8]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40d56e
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40dde9
push edx
push ecx
call fcn.0045b5e1
add esp, 8
mov dword [ebp - 4], 5
jmp 0x40dda9
push 0x208
lea eax, [ebp - 0x268]
push 0
push eax
call fcn.004beec0
add esp, 0xc
mov dword [ebp - 0x2f4], 0x208
lea eax, [ebp - 0x2f4]
push eax
lea eax, [ebp - 0x268]
push eax
push 0
push str.CC_FLASH_VER
push str.SoftwareSogouSogouExplorerPrivateCfg
push 0x80000001
call dword [sym.imp.SHLWAPI.dll_SHGetValueW]
mov esi, dword [ebp - 0x2c8]
test eax, eax
jne 0x40d787
lea edx, [ebp - 0x268]
lea ecx, [edx + 2]
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x40d5e0
sub edx, ecx
lea eax, [ebp - 0x268]
sar edx, 1
lea ecx, [ebp - 0x2c8]
cmp dword [ebp - 0x2b4], 8
push edx
mov edx, dword [ebp - 0x2b8]
cmovae ecx, esi
push eax
call fcn.00417db0
add esp, 8
test eax, eax
jne 0x40d787
cmp dword [ebp - 0x26c], 8
lea eax, [ebp - 0x280]
cmovae eax, dword [ebp - 0x280]
push eax
mov dword [ebp - 0x2e4], eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x40d663
push dword [ebp - 0x2e4]
mov eax, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
call eax
test eax, eax
je 0x40d663
push 4
push 0
push dword [ebp - 0x2e4]
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
xor eax, eax
mov byte [ebp - 4], 2
mov edx, dword [ebp - 0x284]
mov dword [edi], 0
mov dword [edi + 0x10], 0
mov dword [edi + 0x14], 7
mov word [edi], ax
cmp edx, 8
jb 0x40d6c0
mov ecx, dword [ebp - 0x298]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40d6b6
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40dde9
push edx
push ecx
call fcn.0045b5e1
add esp, 8
xor eax, eax
mov byte [ebp - 4], 1
mov edx, dword [ebp - 0x26c]
mov dword [ebp - 0x288], 0
mov dword [ebp - 0x284], 7
mov word [ebp - 0x298], ax
cmp edx, 8
jb 0x40d721
mov ecx, dword [ebp - 0x280]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40d717
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40dde9
push edx
push ecx
call fcn.0045b5e1
add esp, 8
xor eax, eax
mov dword [ebp - 0x270], 0
mov word [ebp - 0x280], ax
mov byte [ebp - 4], al
mov eax, dword [ebp - 0x2b4]
mov dword [ebp - 0x26c], 7
cmp eax, 8
jb 0x40d77b
lea ecx, [eax*2 + 2]
mov eax, esi
cmp ecx, 0x1000
jb 0x40d771
mov esi, dword [esi - 4]
add ecx, 0x23
sub eax, esi
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40dde9
push ecx
push esi
call fcn.0045b5e1
add esp, 8
mov dword [ebp - 4], 6
jmp 0x40dda9
mov dword [ebp - 0x2b0], 0
mov dword [ebp - 0x2a0], 0
mov dword [ebp - 0x29c], 0xf
mov byte [ebp - 0x2b0], 0
mov byte [ebp - 4], 7
lea ecx, [ebp - 0x280]
cmp dword [ebp - 0x26c], 8
lea edx, [ebp - 0x2b0]
cmovae ecx, dword [ebp - 0x280]
push ecx
call fcn.0040be90
add esp, 4
test al, al
jne 0x40d99e
cmp dword [ebp - 0x26c], 8
lea eax, [ebp - 0x280]
cmovae eax, dword [ebp - 0x280]
push eax
mov dword [ebp - 0x2e4], eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x40d821
push dword [ebp - 0x2e4]
mov eax, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
call eax
test eax, eax
je 0x40d821
push 4
push 0
push dword [ebp - 0x2e4]
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
xor eax, eax
mov byte [ebp - 4], 3
mov edx, dword [ebp - 0x29c]
mov dword [edi], 0
mov dword [edi + 0x10], 0
mov dword [edi + 0x14], 7
mov word [edi], ax
cmp edx, 0x10
jb 0x40d878
mov ecx, dword [ebp - 0x2b0]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x40d86e
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40dde9
push edx
push ecx
call fcn.0045b5e1
add esp, 8
mov byte [ebp - 4], 2
mov edx, dword [ebp - 0x284]
mov dword [ebp - 0x2a0], 0
mov dword [ebp - 0x29c], 0xf
mov byte [ebp - 0x2b0], 0
cmp edx, 8
jb 0x40d8d7
mov ecx, dword [ebp - 0x298]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40d8cd
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40dde9
push edx
push ecx
call fcn.0045b5e1
add esp, 8
xor eax, eax
mov byte [ebp - 4], 1
mov edx, dword [ebp - 0x26c]
mov dword [ebp - 0x288], 0
mov dword [ebp - 0x284], 7
mov word [ebp - 0x298], ax
cmp edx, 8
jb 0x40d938
mov ecx, dword [ebp - 0x280]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40d92e
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40dde9
push edx
push ecx
call fcn.0045b5e1
add esp, 8
xor eax, eax
mov dword [ebp - 0x270], 0
mov word [ebp - 0x280], ax
mov byte [ebp - 4], al
mov eax, dword [ebp - 0x2b4]
mov dword [ebp - 0x26c], 7
cmp eax, 8
jb 0x40d992
lea ecx, [eax*2 + 2]
mov eax, esi
cmp ecx, 0x1000
jb 0x40d988
mov esi, dword [esi - 4]
add ecx, 0x23
sub eax, esi
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40dde9
push ecx
push esi
call fcn.0045b5e1
add esp, 8
mov dword [ebp - 4], 8
jmp 0x40dda9
push 0x42
lea eax, [ebp - 0x60]
push 0
push eax
call fcn.004beec0
add esp, 0xc
lea ecx, [ebp - 0x60]
cmp dword [ebp - 0x29c], 0x10
lea eax, [ebp - 0x2b0]
cmovae eax, dword [ebp - 0x2b0]
push 0x21
push ecx
push 0xffffffffffffffff
push eax
push 0
push 0
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
cmp dword [ebp - 0x284], 8
lea ecx, [ebp - 0x60]
lea eax, [ebp - 0x298]
cmovae eax, dword [ebp - 0x298]
push ecx
push eax
call fcn.004d0817
add esp, 8
test eax, eax
je 0x40dbc1
cmp dword [ebp - 0x26c], 8
lea eax, [ebp - 0x280]
cmovae eax, dword [ebp - 0x280]
push eax
mov dword [ebp - 0x2e4], eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x40da44
push dword [ebp - 0x2e4]
mov eax, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
call eax
test eax, eax
je 0x40da44
push 4
push 0
push dword [ebp - 0x2e4]
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
xor eax, eax
mov byte [ebp - 4], 3
mov edx, dword [ebp - 0x29c]
mov dword [edi], 0
mov dword [edi + 0x10], 0
mov dword [edi + 0x14], 7
mov word [edi], ax
cmp edx, 0x10
jb 0x40da9b
mov ecx, dword [ebp - 0x2b0]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x40da91
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40dde9
push edx
push ecx
call fcn.0045b5e1
add esp, 8
mov byte [ebp - 4], 2
mov edx, dword [ebp - 0x284]
mov dword [ebp - 0x2a0], 0
mov dword [ebp - 0x29c], 0xf
mov byte [ebp - 0x2b0], 0
cmp edx, 8
jb 0x40dafa
mov ecx, dword [ebp - 0x298]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40daf0
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40dde9
push edx
push ecx
call fcn.0045b5e1
add esp, 8
xor eax, eax
mov byte [ebp - 4], 1
mov edx, dword [ebp - 0x26c]
mov dword [ebp - 0x288], 0
mov dword [ebp - 0x284], 7
mov word [ebp - 0x298], ax
cmp edx, 8
jb 0x40db5b
mov ecx, dword [ebp - 0x280]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40db51
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40dde9
push edx
push ecx
call fcn.0045b5e1
add esp, 8
xor eax, eax
mov dword [ebp - 0x270], 0
mov word [ebp - 0x280], ax
mov byte [ebp - 4], al
mov eax, dword [ebp - 0x2b4]
mov dword [ebp - 0x26c], 7
cmp eax, 8
jb 0x40dbb5
lea ecx, [eax*2 + 2]
mov eax, esi
cmp ecx, 0x1000
jb 0x40dbab
mov esi, dword [esi - 4]
add ecx, 0x23
sub eax, esi
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40dde9
push ecx
push esi
call fcn.0045b5e1
add esp, 8
mov dword [ebp - 4], 9
jmp 0x40dda9
mov eax, dword [ebp - 0x2f8]
test eax, eax
je 0x40dbff
movups xmm0, xmmword [ebp - 0x2c8]
movups xmm1, xmmword [eax]
movq xmm2, qword [eax + 0x10]
movups xmmword [eax], xmm0
movq xmm0, qword [ebp - 0x2b8]
movups xmmword [ebp - 0x2c8], xmm1
mov esi, dword [ebp - 0x2c8]
movq qword [eax + 0x10], xmm0
movq qword [ebp - 0x2b8], xmm2
movups xmm0, xmmword [ebp - 0x280]
mov dword [edi], 0
xor ecx, ecx
mov dword [edi + 0x10], 0
mov eax, 7
mov dword [edi + 0x14], 0
movups xmmword [edi], xmm0
mov word [ebp - 0x280], cx
movq xmm0, qword [ebp - 0x270]
mov byte [ebp - 4], 3
mov edx, dword [ebp - 0x29c]
movq qword [edi + 0x10], xmm0
mov dword [ebp - 0x270], 0
mov dword [ebp - 0x26c], eax
cmp edx, 0x10
jb 0x40dc8c
mov ecx, dword [ebp - 0x2b0]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x40dc7c
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40dde9
push edx
push ecx
call fcn.0045b5e1
mov eax, dword [ebp - 0x26c]
add esp, 8
mov byte [ebp - 4], 2
mov edx, dword [ebp - 0x284]
mov dword [ebp - 0x2a0], 0
mov dword [ebp - 0x29c], 0xf
mov byte [ebp - 0x2b0], 0
cmp edx, 8
jb 0x40dcf1
mov ecx, dword [ebp - 0x298]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40dce1
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40dde9
push edx
push ecx
call fcn.0045b5e1
mov eax, dword [ebp - 0x26c]
add esp, 8
xor ecx, ecx
mov dword [ebp - 0x288], 0
mov dword [ebp - 0x284], 7
mov word [ebp - 0x298], cx
mov byte [ebp - 4], 1
cmp eax, 8
jb 0x40dd4c
mov ecx, dword [ebp - 0x280]
lea edx, [eax*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40dd42
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40dde9
push edx
push ecx
call fcn.0045b5e1
add esp, 8
xor eax, eax
mov dword [ebp - 0x270], 0
mov word [ebp - 0x280], ax
mov byte [ebp - 4], al
mov eax, dword [ebp - 0x2b4]
mov dword [ebp - 0x26c], 7
cmp eax, 8
jb 0x40dda2
lea ecx, [eax*2 + 2]
mov eax, esi
cmp ecx, 0x1000
jb 0x40dd98
mov esi, dword [esi - 4]
add ecx, 0x23
sub eax, esi
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40dde9
push ecx
push esi
call fcn.0045b5e1
add esp, 8
mov dword [ebp - 4], 0xa
cmp dword [ebp - 0x2ec], 0
je 0x40ddc4
mov eax, dword [ebp - 0x2e8]
test eax, eax
je 0x40ddc4
push dword [ebp - 0x2f0]
call eax
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0045b5b0
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret
call fcn.004c1e0f
call fcn.004c1e0f
int3