Function at 0x466a50
Capabilities:
Check for time delay via gettickcount
Check if file exists
Get file size
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x23c
mov eax, dword [0x4af6f0]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
mov dword [ebp - 0x220], eax
xor ebx, ebx
mov eax, dword [ebp + 0xc]
xor esi, esi
mov dword [ebp - 0x210], eax
xor edi, edi
mov eax, dword [ebp + 0x28]
push eax
push dword [ebp + 0x1c]
mov dword [ebp - 0x21c], eax
push dword [ebp + 0x18]
mov dword [ebp - 0x228], ebx
push dword [ebp + 0x14]
mov dword [ebp - 0x22c], ebx
push dword [ebp + 0x10]
mov dword [ebp - 0x234], ebx
push str.ExtractPieceOfFile____OffSet_I64d_FileSize_I64u_FileTo_s
mov dword [ebp - 0x230], ebx
call fcn.00469390
add esp, 0x18
cmp dword [0x4b552c], ebx
jne 0x466f8f
mov ecx, dword [ebp - 0x220]
mov esi, dword [sym.imp.KERNEL32.dll_CreateFileW]
test ecx, ecx
jne 0x466afa
mov eax, dword [ebp - 0x210]
test eax, eax
je 0x466afa
push edi
push 0x80
push 3
push edi
push 1
push closesocket
push eax
call esi
mov dword [ebp - 0x218], eax
jmp 0x466b02
mov eax, ecx
mov dword [ebp - 0x218], ecx
cmp eax, 0xffffffff
jne 0x466b23
push 0
push 0
push 0
push str.CreateFile
push 0
call fcn.0043fb20
add esp, 0x14
mov ebx, eax
jmp 0x466f89
cmp dword [ebp + 0x30], ebx
mov ebx, dword [ebp - 0x21c]
je 0x466bde
push 0
push 0x80
push 4
push 0
push 0
push 0x40000000
push ebx
call esi
mov edi, eax
mov dword [ebp - 0x224], edi
cmp edi, 0xffffffff
je 0x466bde
lea eax, [ebp - 0x234]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x466bde
mov ebx, dword [ebp - 0x234]
mov edx, dword [ebp - 0x230]
push 2
push 0
push 0
push 0
push edi
mov dword [ebp - 0x210], ebx
mov dword [ebp - 0x214], edx
call fcn.00440130
add esp, 0x14
push 0
push 0
test eax, eax
je 0x466bc7
mov ecx, dword [ebp - 0x234]
add ecx, dword [ebp + 0x10]
mov eax, dword [ebp - 0x230]
adc eax, dword [ebp + 0x14]
push eax
push ecx
push dword [ebp - 0x220]
call fcn.00440130
add esp, 0x14
test eax, eax
jne 0x466d24
push eax
push eax
push 0
push 0x495cec
push 0
call fcn.0043fb20
mov ebx, dword [ebp - 0x21c]
add esp, 0x14
xorps xmm0, xmm0
movlpd qword [ebp - 0x23c], xmm0
test edi, edi
je 0x466bf4
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp + 0x2c], 0
je 0x466c46
xor eax, eax
push 0x206
push eax
mov word [ebp - 0x20c], ax
lea eax, [ebp - 0x20a]
push eax
call fcn.0046f7e0
push ebx
lea eax, [ebp - 0x20c]
push 0x104
push eax
call fcn.0046fe12
add esp, 0x18
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
lea eax, [ebp - 0x20c]
push eax
call fcn.0043b250
add esp, 4
cmp dword [ebp + 0x34], 0
push 0
push 0x80
je 0x466c6b
push 3
push 0
push 0
push 0x40000000
push ebx
call esi
mov edi, eax
mov dword [ebp - 0x224], edi
jmp 0x466c81
push 2
push 0
push 0
push 0x40000000
push ebx
call esi
mov edi, eax
mov dword [ebp - 0x224], eax
cmp edi, 0xffffffff
jne 0x466ca2
push 0
push 0
push 0
push str.CreateFile
push 0
call fcn.0043fb20
add esp, 0x14
mov ebx, eax
jmp 0x466f82
lea eax, [ebp + 0x20]
push eax
push 0
push eax
push edi
call dword [sym.imp.KERNEL32.dll_SetFileTime]
push 0
push 0
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [ebp - 0x220]
call fcn.00440130
add esp, 0x14
test eax, eax
jne 0x466ce4
push eax
push eax
push eax
push str.SetFileSeek64
push eax
call fcn.0043fb20
add esp, 0x14
mov ebx, eax
jmp 0x466f7e
push 2
push 0
push 0
push 0
push edi
call fcn.00440130
add esp, 0x14
test eax, eax
jne 0x466d0a
push eax
push eax
push eax
push 0x495cec
push eax
call fcn.0043fb20
add esp, 0x14
mov eax, dword [ebp - 0x238]
mov ebx, dword [ebp - 0x23c]
mov dword [ebp - 0x214], eax
mov dword [ebp - 0x210], ebx
jmp 0x466d2a
mov eax, dword [ebp - 0x214]
mov edx, dword [ebp + 0x18]
mov esi, edx
mov ecx, dword [ebp + 0x1c]
sub esi, ebx
mov ebx, ecx
sbb ebx, eax
mov eax, dword [0x4af065]
or eax, dword [0x4af069]
jne 0x466d5c
push ecx
xorps xmm0, xmm0
mov ecx, 0x4af010
push edx
movlpd qword [0x4af081], xmm0
call fcn.00428f60
mov ecx, dword [0x4af081]
add ecx, dword [ebp - 0x210]
mov eax, dword [0x4af085]
adc eax, dword [ebp - 0x214]
push eax
mov dword [0x4af081], ecx
push ecx
mov ecx, 0x4af010
mov dword [0x4af085], eax
call fcn.004293d0
mov eax, esi
mov edx, 0x100000
or eax, ebx
mov dword [ebp - 0x214], edx
je 0x466dad
test ebx, ebx
ja 0x466dad
jb 0x466da5
cmp esi, edx
jae 0x466dad
mov edx, esi
mov dword [ebp - 0x214], esi
xor ecx, ecx
mov eax, edx
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0046a14a
add esp, 4
mov dword [ebp - 0x210], eax
test eax, eax
je 0x466f79
mov dword [eax], 0
cmp dword [0x4b552c], 0
jne 0x466f4c
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [ebp - 0x238], eax
mov edi, 1
test ebx, ebx
jne 0x466e06
test esi, esi
je 0x466efc
test edi, edi
je 0x466f17
cmp dword [0x4b552c], 0
jne 0x466ef8
xor eax, eax
cmp eax, ebx
jb 0x466e37
ja 0x466e2d
mov eax, dword [ebp - 0x214]
cmp eax, esi
jbe 0x466e3d
mov eax, esi
mov dword [ebp - 0x214], eax
jmp 0x466e3d
mov eax, dword [ebp - 0x214]
push 0
lea ecx, [ebp - 0x228]
push ecx
push eax
push dword [ebp - 0x210]
push dword [ebp - 0x218]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov edi, eax
test edi, edi
je 0x466f17
mov eax, dword [ebp - 0x228]
test eax, eax
je 0x466ef8
push 0
lea ecx, [ebp - 0x22c]
push ecx
push eax
push dword [ebp - 0x210]
push dword [ebp - 0x224]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov edi, eax
mov eax, dword [ebp - 0x228]
sub esi, eax
push edi
sbb ebx, 0
push ebx
push esi
push eax
push dword [ebp - 0x22c]
push str.ExtractPieceOfFile____BytesWriten_u_BytesRead_u_BytesToCopy_I64u_Result_d
call fcn.00469390
add esp, 0x18
test edi, edi
je 0x466ee6
mov eax, dword [ebp - 0x22c]
test eax, eax
je 0x466ee6
mov ecx, dword [0x4af081]
add ecx, eax
mov eax, dword [0x4af085]
mov dword [0x4af081], ecx
adc eax, 0
push eax
push ecx
mov ecx, 0x4af010
mov dword [0x4af085], eax
call fcn.004293d0
test ebx, ebx
ja 0x466e06
jb 0x466ef8
test esi, esi
jne 0x466e06
test edi, edi
je 0x466f17
mov eax, dword [ebp - 0x21c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
xor ebx, ebx
test eax, eax
mov eax, 2
cmove ebx, eax
jmp 0x466f1c
mov ebx, 0x17
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [ebp - 0x238]
push eax
push str.ExtractPieceOfFile____Extract_done_in__d_ms
call fcn.00469390
add esp, 8
push dword [ebp - 0x210]
call fcn.00470cd4
mov edi, dword [ebp - 0x224]
add esp, 4
jmp 0x466f7e
push 0
push 0
push 0
push str.CreateFile
push 0
call fcn.0043fb20
add esp, 0x14
mov ebx, eax
push dword [ebp - 0x210]
call fcn.00470cd4
mov edi, dword [ebp - 0x224]
add esp, 4
jmp 0x466f7e
mov ebx, 8
test edi, edi
je 0x466f89
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [ebp - 0x218]
cmp dword [ebp - 0x220], 0
jne 0x466fa3
test esi, esi
je 0x466fa3
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [0x4b552c], 0
je 0x466fc2
pop edi
pop esi
mov eax, 0x4c7
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0046ecfa
mov esp, ebp
pop ebp
ret
push ebx
push str.ExtractPieceOfFile____End__d_
call fcn.004696f0
mov ecx, dword [ebp - 4]
add esp, 8
mov eax, ebx
xor ecx, ebp
pop edi
pop esi
pop ebx
call fcn.0046ecfa
mov esp, ebp
pop ebp
ret