Function at 0x405940
Capabilities:
Check if file exists
Move file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x424db6
mov eax, dword fs:[0]
push eax
sub esp, 0x24
push ebx
push esi
push edi
mov eax, dword [0x433610]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov eax, dword [edi + 0x20]
push eax
call fcn.00417170
mov esi, eax
mov eax, dword [0x4335d8]
mov edx, dword [eax + 0xc]
mov ecx, 0x4335d8
call edx
add eax, 0x10
mov dword [ebp - 0x14], eax
mov dword [ebp - 4], 0
test esi, esi
je 0x4059bb
test esi, 0xffff0000
jne 0x4059bb
movzx esi, si
push 0
push esi
call fcn.004011e0
add esp, 8
test eax, eax
je 0x4059c4
push esi
push eax
lea ecx, [ebp - 0x14]
call fcn.00402c50
jmp 0x4059c4
push esi
lea ecx, [ebp - 0x14]
call fcn.00405740
mov eax, dword [edi + 0x24]
mov ebx, 1
push eax
mov dword [ebp - 4], ebx
call fcn.00417170
mov esi, eax
mov eax, dword [0x4335d8]
mov edx, dword [eax + 0xc]
mov ecx, 0x4335d8
call edx
add eax, 0x10
mov dword [ebp - 0x18], eax
mov byte [ebp - 4], 2
test esi, esi
je 0x405a1a
test esi, 0xffff0000
jne 0x405a1a
movzx esi, si
push 0
push esi
call fcn.004011e0
add esp, 8
test eax, eax
je 0x405a23
push esi
push eax
lea ecx, [ebp - 0x18]
call fcn.00402c50
jmp 0x405a23
push esi
lea ecx, [ebp - 0x18]
call fcn.00405740
test byte [0x434778], 1
mov byte [ebp - 4], 3
jne 0x405a55
or dword [0x434778], ebx
mov ecx, 0x434744
mov byte [ebp - 4], 4
call fcn.00408630
push 0x426160
call fcn.00417f35
add esp, 4
mov byte [ebp - 4], 3
mov ecx, 0x434744
call fcn.00409030
test eax, eax
je 0x405a86
mov ecx, dword [ebp - 0x14]
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x18]
push eax
push ecx
lea edx, [ebp - 0x20]
push str.InstallerJob:_file_s_params_s
push edx
mov dword [ebp - 0x1c], 4
call fcn.00408ee0
add esp, 0x10
mov ecx, dword [ebp - 0x14]
mov eax, dword [ecx - 0xc]
test eax, eax
je 0x405ecd
cmp eax, 0x104
jg 0x405ecd
mov eax, dword [ebp - 0x18]
cmp dword [eax - 0xc], 0x104
jle 0x405ac4
add eax, 0xfffffff0
mov byte [ebp - 4], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jmp 0x405ee4
push ecx
lea ecx, [ebp - 0x1c]
call fcn.00403a00
mov ecx, dword [ebp - 0x1c]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
mov eax, dword [ebp - 0x1c]
sete bl
add eax, 0xfffffff0
or esi, 0xffffffff
lea edx, [eax + 0xc]
mov ecx, esi
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x405afd
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
test bl, bl
je 0x405ba1
push 2
call dword [sym.imp.KERNEL32.DLL_SetLastError]
call fcn.00401260
mov esi, eax
call fcn.00401810
mov ecx, eax
call fcn.00409030
test eax, eax
je 0x405b44
mov ecx, dword [ebp - 0x14]
push esi
push ecx
lea edx, [ebp - 0x20]
push str.InstallerJob:___s__not_found__0x_x_
push edx
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x1c], 0xfffffffe
call fcn.00408ee0
add esp, 0x10
mov eax, dword [ebp - 0x18]
add eax, 0xfffffff0
mov byte [ebp - 4], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x405b67
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x405b8d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 0x14]
push ecx
call fcn.00404d50
add esp, 4
test al, al
jne 0x405c45
mov edx, dword [ebp - 0x14]
push 1
lea eax, [ebp - 0x1c]
push eax
push 0xc8
push 2
push 1
mov ecx, 0x434818
mov dword [ebp - 0x1c], edx
call fcn.0040da10
call fcn.00401810
mov ecx, eax
call fcn.00409030
test eax, eax
je 0x405bff
mov ecx, dword [ebp - 0x14]
push ecx
lea edx, [ebp - 0x30]
push str.InstallerJob:___s__is_not_signed.
push edx
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x2c], esi
call fcn.00408ee0
add esp, 0xc
mov eax, dword [0x434ac4]
push eax
push 0
push 0x42a4f0
push 0
push 0
push 0x200
push 0x427f84
call fcn.00402600
mov esi, eax
lea ecx, [ebp - 0x18]
call fcn.00401ad0
lea ecx, [ebp - 0x14]
call fcn.00401ad0
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 0x14]
push str.Skype_Technologies_SA
push ecx
call fcn.00404e00
add esp, 8
test al, al
jne 0x405cee
mov edx, dword [ebp - 0x14]
push 1
lea eax, [ebp - 0x1c]
push eax
push 0xc8
push 2
push 1
mov ecx, 0x434818
mov dword [ebp - 0x1c], edx
call fcn.0040da10
call fcn.00401810
mov ecx, eax
call fcn.00409030
test eax, eax
je 0x405ca8
mov ecx, dword [ebp - 0x14]
push ecx
lea edx, [ebp - 0x30]
push str.InstallerJob:___s__has_invalid_signature.
push edx
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x2c], esi
call fcn.00408ee0
add esp, 0xc
mov eax, dword [0x434ac4]
push eax
push 0
push 0x42a4f0
push 0
push 0
push 0x200
push 0x427f84
call fcn.00402600
lea ecx, [ebp - 0x18]
mov esi, eax
call fcn.00401ad0
lea ecx, [ebp - 0x14]
call fcn.00401ad0
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
xor ebx, ebx
mov byte [ebp - 0xd], 0
mov dword [ebp - 0x28], vtable.ATL::CAccessToken.0
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x1c], ebx
lea ecx, [ebp - 0x28]
push ecx
mov byte [ebp - 4], 5
call fcn.004096d0
add esp, 4
test al, al
jne 0x405d58
call fcn.00401260
mov esi, eax
call fcn.00401810
mov ecx, eax
call fcn.00409030
cmp eax, ebx
je 0x405d4b
push esi
lea edx, [ebp - 0x30]
push str.InstallerJob:_failed_to_CreateElevatedProcessAsConsoleUser__0x_x_
push edx
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x2c], 0xfffffffe
call fcn.00408ee0
add esp, 0xc
lea ecx, [ebp - 0x28]
call fcn.00409e20
jmp 0x405c21
lea eax, [ebp - 0xd]
push eax
lea ecx, [ebp - 0x28]
push ecx
call fcn.00416ce0
mov esi, eax
add esp, 8
lea ecx, [ebp - 0x28]
cmp esi, ebx
jl 0x405d4e
mov byte [ebp - 4], 3
call fcn.00409e20
call fcn.00401810
mov ecx, eax
call fcn.00409030
cmp eax, ebx
je 0x405db6
cmp byte [ebp - 0xd], 0
mov ecx, str.CONSOLE
jne 0x405d9a
mov ecx, str.SYSTEM
push ecx
lea edx, [ebp - 0x30]
push str.InstallerJob:_run_installer_as__s_user.
push edx
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x2c], 2
call fcn.00408ee0
add esp, 0xc
cmp byte [ebp - 0xd], 0
lea eax, [ebp - 0x18]
lea ecx, [ebp - 0x14]
push eax
push ecx
je 0x405e10
call fcn.0040c8c0
add esp, 8
test al, al
jne 0x405e58
call fcn.00401260
mov esi, eax
call fcn.00401810
mov ecx, eax
call fcn.00409030
cmp eax, ebx
je 0x405c21
push esi
lea edx, [ebp - 0x30]
push str.InstallerJob:_failed_to_CreateElevatedProcessAsConsoleUser__0x_x_
push edx
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x2c], 0xfffffffe
call fcn.00408ee0
add esp, 0xc
jmp 0x405c21
call fcn.0040c720
add esp, 8
test al, al
jne 0x405e58
call fcn.00401260
mov esi, eax
call fcn.00401810
mov ecx, eax
call fcn.00409030
cmp eax, ebx
je 0x405c21
push esi
lea edx, [ebp - 0x30]
push str.InstallerJob:_failed_to_CreateElevatedProcessAsLocalSystemUser__0x_x_
push edx
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x2c], 0xfffffffe
call fcn.00408ee0
add esp, 0xc
jmp 0x405c21
mov eax, dword [edi + 0x20]
push 4
push ebx
push eax
call dword [sym.imp.KERNEL32.DLL_MoveFileExW]
test eax, eax
jne 0x405ea9
call fcn.00401260
mov esi, eax
call fcn.00401810
mov ecx, eax
call fcn.00409030
cmp eax, ebx
je 0x405c21
mov dword [ebp - 0x30], eax
mov eax, dword [edi + 0x20]
push esi
push eax
lea ecx, [ebp - 0x30]
push str.InstallerJob:_failed_to_move_file__s__0x_x_
push ecx
mov dword [ebp - 0x2c], 0xfffffffe
call fcn.00408ee0
add esp, 0x10
jmp 0x405c21
lea ecx, [ebp - 0x18]
call fcn.00401ad0
lea ecx, [ebp - 0x14]
call fcn.00401ad0
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x18]
add eax, 0xfffffff0
mov byte [ebp - 4], 1
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x405ef0
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff0
or edx, 0xffffffff
lea ecx, [eax + 0xc]
mov dword [ebp - 4], edx
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x405f12
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, 0x80070057
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret