Function at 0x412150
Capabilities:
Check if file exists
Copy file
Delete file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x45edf0
mov eax, dword fs:[0]
push eax
sub esp, 0x24
push esi
push edi
mov eax, dword [0x4786a0]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
xor esi, esi
mov dword [ebp - 4], esi
cmp byte [ebx + 0x111], 0
je 0x4126c6
cmp byte [ebx + 0x110], 0
je 0x4126c6
mov eax, dword [ebx + 0x214]
sub eax, dword [ebx + 0x210]
sar eax, 2
test eax, eax
je 0x4126c6
mov edx, dword [0x478034]
mov eax, dword [edx + 0xc]
mov ecx, 0x478034
call eax
add eax, 0x10
mov dword [ebp - 0x1c], eax
mov byte [ebp - 4], 1
mov edx, dword [0x478034]
mov eax, dword [edx + 0xc]
mov ecx, 0x478034
call eax
add eax, 0x10
mov dword [ebp - 0x20], eax
mov byte [ebp - 4], 2
mov ecx, dword [ebx + 0x214]
sub ecx, dword [ebx + 0x210]
sar ecx, 2
test ecx, ecx
je 0x412680
jmp 0x412200
mov edx, dword [ebx + 0x210]
lea eax, [edx + esi*4]
lea edi, [ebp - 0x20]
call fcn.0041db20
mov eax, dword [ebp + 8]
mov eax, dword [eax - 0xc]
mov edi, dword [ebp - 0x20]
cmp eax, dword [edi - 0xc]
jle 0x412269
mov eax, dword [edi - 0xc]
lea ecx, [ebp + 8]
push ecx
lea ecx, [ebp - 0x28]
call fcn.0041e360
mov eax, dword [eax]
push edi
push eax
call fcn.0044646f
add esp, 8
test eax, eax
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x28]
sete byte [ebp - 0xd]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x412263
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
cmp byte [ebp - 0xd], 0
jne 0x412282
mov ecx, dword [ebx + 0x214]
sub ecx, dword [ebx + 0x210]
inc esi
sar ecx, 2
cmp esi, ecx
jb 0x412200
jmp 0x412680
push ecx
lea eax, [edi - 0x10]
mov dword [ebp - 0x18], esp
mov esi, esp
mov dword [ebp - 0x28], eax
call fcn.004218e0
add eax, 0x10
mov dword [esi], eax
mov byte [ebp - 4], 4
mov eax, dword [ebx + 0x9c]
push ecx
sub eax, 0x10
mov dword [ebp - 0x14], esp
mov esi, esp
call fcn.004218e0
add eax, 0x10
mov dword [esi], eax
lea esi, [ebp - 0x24]
mov byte [ebp - 4], 2
call fcn.004196c0
lea edi, [ebp - 0x1c]
mov byte [ebp - 4], 5
call fcn.0041db20
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x24]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4122f0
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov esi, dword [ebp - 0x1c]
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x412305
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push ecx
mov ecx, esp
mov dword [ebp - 0x2c], esp
push ecx
mov ecx, 0x46ce9c
mov dword [ebp - 0x24], 0
call fcn.00401110
mov byte [ebp - 4], 6
mov eax, dword [ebp + 8]
push ecx
add eax, 0xfffffff0
mov dword [ebp - 0x30], esp
mov esi, esp
call fcn.004218e0
add eax, 0x10
mov dword [esi], eax
lea esi, [ebp - 0x18]
mov byte [ebp - 4], 2
call fcn.00419120
push ecx
mov byte [ebp - 4], 7
mov edx, esp
mov dword [ebp - 0x30], esp
push edx
mov ecx, 0x46ce9c
call fcn.00401110
mov byte [ebp - 4], 8
mov esi, dword [ebp - 0x1c]
push ecx
add esi, 0xfffffff0
mov eax, esi
mov dword [ebp - 0x2c], esp
mov edi, esp
call fcn.004218e0
add eax, 0x10
mov dword [edi], eax
lea eax, [ebp - 0x14]
push eax
mov byte [ebp - 4], 7
call fcn.00419270
mov byte [ebp - 4], 9
mov eax, dword [ebx + 0x9c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x412480
mov eax, dword [ebx + 0x9c]
push ecx
sub eax, 0x10
mov dword [ebp - 0x30], esp
mov edi, esp
call fcn.004218e0
add eax, 0x10
mov ecx, ebx
mov dword [edi], eax
call fcn.00418a50
test al, al
jne 0x412480
mov byte [ebp - 4], 7
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4123e5
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x412408
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x28]
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x412428
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 0
lea ecx, [esi + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x412445
mov ecx, dword [esi]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push esi
call edx
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp + 8]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x41246b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [ebp - 0x14]
xor eax, eax
test ecx, ecx
setne al
test eax, eax
jne 0x412498
push 0x80004005
call fcn.00401680
mov eax, dword [ebx + 0x9c]
push ecx
push eax
call fcn.0044646f
add esp, 8
test eax, eax
je 0x412518
mov ecx, dword [ebp - 0x14]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x412518
mov eax, dword [ebp - 0x14]
push ecx
add eax, 0xfffffff0
mov dword [ebp - 0x30], esp
mov edi, esp
call fcn.004218e0
add eax, 0x10
mov ecx, ebx
mov dword [edi], eax
call fcn.00418a50
test al, al
jne 0x412518
lea eax, [ebp - 0x14]
call fcn.0041d790
lea eax, [ebp - 0x18]
call fcn.0041d790
lea eax, [ebp - 0x20]
call fcn.0041d790
lea eax, [ebp - 0x1c]
call fcn.0041d790
lea eax, [ebp + 8]
call fcn.0041d790
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret 4
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp + 8]
push 0
lea edx, [ebp - 0x24]
push edx
push 0
push 0
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_CopyFileExW]
test eax, eax
jne 0x41263a
cmp dword [ebp - 0x24], eax
jne 0x412578
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebx + 0x104], eax
lea edi, [ebx + 0x100]
test eax, eax
je 0x412567
mov edx, dword [ebp - 0x18]
push eax
push edx
push str.Failed_to_copy__s_file._Error:__d.
call fcn.00422e30
add esp, 0xc
jmp 0x412578
mov eax, dword [ebp - 0x18]
push eax
push str.Failed_to_copy__s_file.
call fcn.00422e30
add esp, 8
mov byte [ebp - 4], 7
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x41259b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4125be
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x28]
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4125de
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 0
lea ecx, [esi + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4125fb
mov ecx, dword [esi]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push esi
call edx
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp + 8]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x41246b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret 4
mov byte [ebp - 4], 7
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x41265d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x412680
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x20]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4126a3
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x1c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4126c6
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp + 8]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4126ec
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov al, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret 4