Function at 0x4121d0
Capabilities:
Check if file exists
Copy file
Delete file
Get common file path
Move file
Set file attributes

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x2e34
call fcn.004981d0
mov eax, dword [0x5023a4]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 0xc]
push esi
mov esi, dword [ebp + 8]
mov dword [ebp - 0x2e30], ecx
mov dword [ebp - 0x2e28], esi
mov dword [ebp - 0x2e2c], ebx
push edi
test esi, esi
je 0x4126cd
test ebx, ebx
je 0x4126cd
push 0x800
lea eax, [ebp - 0x2e20]
push 0
push eax
call fcn.0049b560
push 0x400
lea eax, [ebp - 0x2e20]
push ebx
push eax
call fcn.004aa018
mov edi, dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
lea eax, [ebp - 0x2e20]
add esp, 0x18
push eax
call edi
lea eax, [ebp - 0x2e20]
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHCreateDirectory]
push 0x800
lea eax, [ebp - 0x2620]
push 0
push eax
call fcn.0049b560
add esp, 0xc
lea eax, [ebp - 0x2620]
push eax
push 0x400
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
push 0
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
jne 0x4126b5
push 3
push ebx
push esi
mov esi, dword [sym.imp.KERNEL32.dll_MoveFileExW]
call esi
test eax, eax
jne 0x4126b5
push 0x800
push eax
lea eax, [ebp - 0x1e20]
push eax
call fcn.0049b560
add esp, 0xc
lea eax, [ebp - 0x1e20]
push eax
push 0
push 0x4dd60c
lea eax, [ebp - 0x2620]
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
test eax, eax
je 0x412643
push 0x208
lea eax, [ebp - 0x210]
push 0
push eax
call fcn.0049b560
lea edx, [ebp - 0x210]
add esp, 0xc
mov ecx, ebx
sub edx, ebx
nop
movzx eax, word [ecx]
lea ecx, [ecx + 2]
mov word [edx + ecx - 2], ax
test ax, ax
jne 0x412300
lea eax, [ebp - 0x210]
push eax
call edi
lea edi, [ebp - 0x210]
add edi, 0xfffffffe
mov ax, word [edi + 2]
lea edi, [edi + 2]
test ax, ax
jne 0x412322
mov eax, dword [0x4da000]
push 0x800
mov dword [edi], eax
lea eax, [ebp - 0x1620]
push 0
push eax
call fcn.0049b560
push 0x208
lea eax, [ebp - 0x620]
push 0
push eax
call fcn.0049b560
add esp, 0x18
lea eax, [ebp - 0x620]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
lea eax, [ebp - 0x1620]
push eax
push 0
push 0x4dd60c
lea eax, [ebp - 0x620]
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
call fcn.004031c0
test eax, eax
je 0x4126e2
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
lea ecx, [ebp - 0x2e24]
mov dword [ebp - 0x2e24], eax
lea eax, [ebp - 0x1620]
push eax
call fcn.004034f0
test al, al
jne 0x4123e9
lea ecx, [ebp - 0x1620]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4123c7
sub ecx, edx
lea eax, [ebp - 0x1620]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x2e24]
call fcn.00403760
lea eax, [ebp - 0x210]
push eax
lea eax, [ebp - 0x620]
push eax
lea ecx, [ebp - 0x2e24]
call fcn.0040f2a0
mov esi, dword [ebp - 0x2e24]
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_MoveFileW]
push 0x208
lea eax, [ebp - 0x418]
push 0
push eax
call fcn.0049b560
lea edx, [ebp - 0x418]
add esp, 0xc
mov ecx, ebx
sub edx, ebx
movzx eax, word [ecx]
lea ecx, [ecx + 2]
mov word [edx + ecx - 2], ax
test ax, ax
jne 0x412430
lea eax, [ebp - 0x418]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
lea ecx, [ebp - 0x418]
add ecx, 0xfffffffe
mov ax, word [ecx + 2]
lea ecx, [ecx + 2]
test ax, ax
jne 0x412456
mov eax, dword [str.Temp_]
mov dword [ecx], eax
mov eax, dword [0x4dd620]
mov dword [ecx + 4], eax
mov eax, dword [0x4dd624]
mov dword [ecx + 8], eax
mov ax, word [0x4dd628]
mov word [ecx + 0xc], ax
call fcn.004031c0
test eax, eax
je 0x4126e2
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
lea ecx, [ebp - 0x2e24]
mov dword [ebp - 0x2e24], eax
lea eax, [ebp - 0x1e20]
push eax
call fcn.004034f0
test al, al
jne 0x4124e2
lea ecx, [ebp - 0x1e20]
lea edx, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4124c0
sub ecx, edx
lea eax, [ebp - 0x1e20]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x2e24]
call fcn.00403760
lea eax, [ebp - 0x418]
push eax
lea eax, [ebp - 0x2620]
push eax
lea ecx, [ebp - 0x2e24]
call fcn.0040f2a0
push 0x800
lea eax, [ebp - 0xe20]
push 0
push eax
call fcn.0049b560
mov edi, dword [ebp - 0x2e24]
lea eax, [ebp - 0xe20]
push 0x400
push edi
push eax
call fcn.004aa018
add esp, 0x18
lea eax, [ebp - 0xe20]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
lea eax, [ebp - 0xe20]
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHCreateDirectory]
push 3
push edi
push esi
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
test eax, eax
je 0x41259c
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
mov eax, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
jne 0x412595
push edi
call eax
test eax, eax
je 0x412590
push 0x80
push edi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
je 0x412585
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x412590
push 4
push 0
push edi
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
mov eax, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
push esi
call eax
test eax, eax
je 0x4125d8
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x4125d8
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x4125d8
push 0x80
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
je 0x4125cd
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x4125d8
push 4
push 0
push esi
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
mov eax, dword [sym.imp.KERNEL32.dll_CopyFileW]
push 0
push ebx
push dword [ebp - 0x2e28]
call eax
mov ebx, eax
test ebx, ebx
jne 0x412604
push 3
push dword [ebp - 0x2e2c]
push dword [ebp - 0x2e28]
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
mov ebx, eax
lea edx, [edi - 0x10]
or edi, 0xffffffff
mov eax, edi
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x41261e
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
add esi, 0xfffffff0
lock xadd dword [esi + 0xc], edi
dec edi
test edi, edi
jg 0x412633
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
test ebx, ebx
jne 0x4126a0
mov ebx, dword [ebp - 0x2e2c]
mov esi, dword [sym.imp.KERNEL32.dll_MoveFileExW]
push 0x800
lea eax, [ebp - 0xe20]
push 0
push eax
call fcn.0049b560
add esp, 0xc
lea eax, [ebp - 0xe20]
push eax
push 0
push 0x4dd60c
lea eax, [ebp - 0x2620]
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
push 3
lea eax, [ebp - 0xe20]
push eax
push dword [ebp - 0x2e28]
call esi
push 5
push ebx
lea eax, [ebp - 0xe20]
push eax
call esi
mov ebx, eax
mov eax, dword [ebp - 0x2e30]
mov byte [eax + 0x1c90], 0
mov eax, ebx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0049765c
mov esp, ebp
pop ebp
ret 8
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0049765c
mov esp, ebp
pop ebp
ret 8
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0049765c
mov esp, ebp
pop ebp
ret 8
push 0x80004005
call fcn.00402f10
int3