Function at 0x405920
Capabilities:
Copy file
Delete file
Get common file path

Disassembly:
sub esp, 0x600
push ebx
push ebp
mov ebp, dword [esp + 0x610]
push esi
xor ebx, ebx
push edi
push ebx
push 0x3f
push 0x2a
push 0x450500
push ebp
call fcn.004264b0
add esp, 0x14
test eax, eax
je 0x405993
lea eax, [esp + 0x10]
mov ebx, 1
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
lea edi, [esp + 0x10]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
add ecx, 0xfffffffe
mov cl, byte [esp + ecx + 0x10]
cmp cl, 0x5c
je 0x405988
cmp cl, 0x2f
je 0x405988
lea edx, [esp + 0x10]
mov edi, str.wdsysmsg.exe
jmp 0x4059d5
lea edx, [esp + 0x10]
mov edi, 0x450544
jmp 0x4059d5
lea eax, [esp + 0x10]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
lea edi, [esp + 0x10]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
add ecx, 0xfffffffe
mov cl, byte [esp + ecx + 0x10]
cmp cl, 0x5c
je 0x4059cc
cmp cl, 0x2f
je 0x4059cc
lea edx, [esp + 0x10]
mov edi, str.wdupdate.tmp
jmp 0x4059d5
lea edx, [esp + 0x10]
mov edi, 0x450328
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push eax
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
push eax
push eax
and ecx, 3
push eax
push eax
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x628]
push eax
lea eax, [esp + 0x28]
push eax
push ecx
push 0
push 0x4533f8
call fcn.0042b200
add esp, 0x28
test eax, eax
jne 0x405a38
lea edx, [esp + 0x10]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x600
ret
test ebx, ebx
je 0x405ac9
lea edi, [esp + 0x10]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x210]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov dword [0x450048], 0xa
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x210]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, str.__app
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea eax, [esp + 0x410]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x214]
push 0
push ecx
push str.ExitExec
call fcn.004040e0
push 0x14
call fcn.00405bd0
add esp, 0x14
lea edx, [esp + 0x410]
lea eax, [esp + 0x10]
push edx
push ebp
push eax
push str.CopyFile
call fcn.004040e0
add esp, 0x10
test eax, eax
je 0x405b08
lea ecx, [esp + 0x410]
push str.true
push ecx
call fcn.00421a60
add esp, 8
test eax, eax
jne 0x405b08
mov ebp, 1
jmp 0x405b18
push 0
lea edx, [esp + 0x14]
push ebp
push edx
call dword [sym.imp.KERNEL32.dll_CopyFileA]
mov ebp, eax
test ebx, ebx
je 0x405baf
mov edi, dword [esp + 0x618]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x210]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x210]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, str.__start
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea eax, [esp + 0x410]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x214]
push 0
push ecx
push str.ExitExec
call fcn.004040e0
push 0x14
call fcn.00405c30
add esp, 0x14
mov eax, ebp
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x600
ret
lea edx, [esp + 0x10]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
pop edi
mov eax, ebp
pop esi
pop ebp
pop ebx
add esp, 0x600
ret