Function at 0x402870
Capabilities:
Copy file
Get file size
Print debug messages

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x454a70
mov eax, dword fs:[0]
push eax
sub esp, 0xc
push ebx
push esi
push edi
mov eax, dword [0x478584]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, dword [ebp + 8]
mov eax, dword [edi + 4]
push 0
push 0x80
push 3
push 0
push 1
push 0xc0000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x402aa7
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push esi
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test ebx, ebx
je 0x402aa7
cmp ebx, dword [edi + 0x10]
jne 0x402aa7
call fcn.00408640
lea esi, [eax + 0xe8]
mov eax, dword [0x47839c]
mov edx, dword [eax + 0xc]
mov ecx, 0x47839c
call edx
add eax, 0x10
mov dword [ebp - 0x10], eax
mov dword [ebp - 4], 1
add edi, 8
push edi
lea eax, [ebp - 0x14]
push esi
push eax
call fcn.00402210
add esp, 0xc
mov byte [ebp - 4], 2
push eax
lea ecx, [ebp - 0x10]
call fcn.00401f40
mov byte [ebp - 4], 1
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 0x40294d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ebx, dword [ebp - 0x10]
push 0x5c
push ebx
call fcn.0043db8c
add esp, 8
test eax, eax
je 0x402991
sub eax, ebx
sar eax, 1
test eax, eax
jle 0x402991
inc eax
push eax
lea ecx, [ebp - 0x14]
push ecx
lea ecx, [ebp - 0x10]
call fcn.00401d70
mov byte [ebp - 4], 4
push eax
lea ecx, [ebp - 0x10]
call fcn.00401f40
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x14]
call fcn.004014c0
mov ebx, dword [ebp - 0x10]
push ebx
call fcn.004352d0
push edi
lea edx, [ebp - 0x14]
push esi
push edx
call fcn.00402210
add esp, 0x10
mov byte [ebp - 4], 5
push eax
lea ecx, [ebp - 0x10]
call fcn.00401f40
mov byte [ebp - 4], 1
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 0x4029d5
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [ebp - 0x10]
mov esi, dword [ebp + 8]
mov eax, dword [esi + 4]
push 0
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
je 0x402a7e
lea edx, [ebp - 0x10]
push edx
call fcn.00402630
mov eax, dword [esi + 0xc]
add esi, 0xc
add esp, 4
cmp dword [eax - 0xc], 0
je 0x402a7e
push 0x45e6a8
lea ecx, [ebp - 0x10]
push ecx
lea edx, [ebp - 0x18]
push edx
call fcn.004022d0
mov bl, 7
mov byte [ebp - 4], bl
push esi
push eax
lea eax, [ebp - 0x14]
push eax
call fcn.00402210
add esp, 0x18
mov byte [ebp - 4], 8
mov eax, dword [eax]
push 0
push 0x80
push 2
push 0
push 1
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
mov byte [ebp - 4], bl
lea ecx, [ebp - 0x14]
call fcn.004014c0
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x18]
call fcn.004014c0
cmp esi, 0xffffffff
jne 0x402a77
push str.Warnning:_cache_index_file_create_fail_
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
jmp 0x402a7e
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x10]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x402aa4
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov edi, dword [ebp + 8]
mov ecx, edi
call fcn.00401520
push edi
call fcn.0043d995
add esp, 4
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4