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

Disassembly:
sub esp, 0x88
mov eax, dword [0x10126a94]
xor eax, esp
mov dword [esp + 0x84], eax
mov eax, dword [esp + 0x90]
push ebx
mov ebx, dword [esp + 0x9c]
push ebp
mov ebp, dword [esp + 0x94]
push esi
push edi
mov edi, eax
mov dword [esp + 0x20], ebp
shl edi, 4
add edi, dword [ebp + 0x10]
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], ebx
mov dword [esp + 0x24], edi
cmp dword [edi + 4], 0
je 0x1001b4cf
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov edx, dword [esp + 0xa4]
lea esi, [esp + 0x34]
mov dword [esp + 0x28], eax
sub esi, edx
mov cl, byte [edx]
lea edx, [edx + 1]
mov byte [esi + edx - 1], cl
test cl, cl
jne 0x1001b086
lea edx, [esp + 0x54]
mov ecx, ebx
sub edx, ebx
nop dword [eax + eax]
mov al, byte [ecx]
lea ecx, [ecx + 1]
mov byte [edx + ecx - 1], al
test al, al
jne 0x1001b0a0
lea ecx, [esp + 0x34]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x1001b0b4
sub ecx, edx
push 0x18
mov dword [esp + ecx + 0x35], 0x726964
call fcn.100b8d28
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x1001b0f1
push str.content_builder
push str.failed_to_allocate_memory_for__s
push 1
push dword [ebp + 0x18]
call fcn.10019a50
add esp, 0x10
jmp 0x1001b4cf
mov esi, dword [sym.imp.KERNEL32.dll_CreateFileA]
lea eax, [esp + 0x34]
push 0
push 0x80
push 3
push 0
push 0
push closesocket
push eax
mov dword [ebx + 8], 0
call esi
push 0
push 0x80
push 2
push 0
push 0
mov dword [ebx], eax
lea eax, [esp + 0x68]
push 0x40000000
push eax
call esi
mov ecx, dword [ebx]
mov dword [ebx + 4], eax
cmp ecx, 0xffffffff
je 0x1001b47a
cmp eax, 0xffffffff
je 0x1001b47a
push 0
push ecx
mov dword [ebx + 0x14], edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ecx, eax
mov dword [esp + 0x18], ecx
test ecx, ecx
je 0x1001b45b
cmp ecx, 0xffffffff
je 0x1001b45b
test cl, 0x1f
jne 0x1001b45b
mov eax, dword [ebx + 0x14]
mov eax, dword [eax + 4]
shl eax, 5
add eax, ecx
push eax
call fcn.100b8d28
mov ecx, eax
add esp, 4
mov dword [ebx + 0xc], ecx
test ecx, ecx
jne 0x1001b1a1
push str.dir_files
push str.failed_to_allocate_memory_for__s
jmp 0x1001b465
mov esi, dword [esp + 0x18]
mov eax, esi
shr eax, 5
push 0
mov dword [ebx + 8], eax
lea eax, [esp + 0x18]
push eax
push esi
push ecx
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1001b44f
cmp dword [esp + 0x14], esi
jne 0x1001b44f
mov eax, dword [ebx + 0x14]
mov edi, dword [ebx + 0xc]
mov dword [esp + 0x10], edi
mov eax, dword [eax + 4]
add eax, dword [ebx + 8]
shl eax, 5
push eax
call fcn.100b8d28
add esp, 4
mov dword [esp + 0x18], eax
test eax, eax
jne 0x1001b203
push str.dir_sorter
push str.failed_to_allocate_memory_for__s
jmp 0x1001b465
xor esi, esi
mov dword [esp + 0x14], 0
mov dword [esp + 0x1c], esi
cmp dword [ebx + 8], esi
jbe 0x1001b2d9
nop word [eax + eax]
mov eax, dword [ebx + 0x14]
mov esi, dword [eax + 4]
mov ecx, dword [eax]
test esi, esi
je 0x1001b261
lea ebp, [edi + 8]
imul edi, esi, 0x108
add edi, ecx
sub edi, 0x108
dec esi
push 0x18
push ebp
push dword [edi + 0x104]
call fcn.10037910
add esp, 0xc
test eax, eax
je 0x1001b259
test esi, esi
jne 0x1001b237
jmp 0x1001b25d
test edi, edi
jne 0x1001b2b4
mov edi, dword [esp + 0x10]
mov ebp, dword [esp + 0x1c]
mov ecx, ebp
mov esi, dword [esp + 0x18]
test ebp, ebp
je 0x1001b29f
mov eax, dword [edi]
cmp eax, dword [esi]
jbe 0x1001b27f
add esi, 0x20
sub ecx, 1
jne 0x1001b271
jmp 0x1001b29f
mov edx, ecx
shl edx, 5
add edx, esi
movups xmm0, xmmword [edx - 0x20]
mov eax, edx
sub edx, 0x20
movups xmmword [eax], xmm0
movups xmm0, xmmword [edx + 0x10]
movups xmmword [eax + 0x10], xmm0
sub ecx, 1
jne 0x1001b286
movups xmm0, xmmword [edi]
inc ebp
mov dword [esp + 0x1c], ebp
movups xmmword [esi], xmm0
movups xmm0, xmmword [edi + 0x10]
movups xmmword [esi + 0x10], xmm0
jmp 0x1001b2b8
mov edi, dword [esp + 0x10]
mov edx, dword [esp + 0x14]
add edi, 0x20
inc edx
mov dword [esp + 0x10], edi
mov dword [esp + 0x14], edx
cmp edx, dword [ebx + 8]
jb 0x1001b220
mov ebp, dword [esp + 0x20]
mov esi, dword [esp + 0x1c]
push dword [ebx + 0xc]
call fcn.100b8d0d
mov eax, dword [esp + 0x1c]
lea ecx, [esp + 0x38]
add esp, 4
mov dword [ebx + 0xc], eax
mov dword [ebx + 8], esi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x1001b2f5
lea eax, [esp + 0x34]
sub ecx, edx
push eax
push ebp
push ebx
mov dword [esp + ecx + 0x3d], 0x676d69
call fcn.1001a670
add esp, 0xc
test eax, eax
je 0x1001b472
push ebp
push ebx
call fcn.1001a8e0
add esp, 8
test eax, eax
je 0x1001b472
lea ecx, [esp + 0x54]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x1001b336
sub ecx, edx
mov dword [esp + ecx + 0x51], 0x726964
push dword [ebx + 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0
push 0x80
push 2
push 0
push 0
push 0x40000000
lea eax, [esp + 0x6c]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebx + 4], eax
cmp eax, 0xffffffff
jne 0x1001b37f
mov eax, str.failed_to_open_file:__s
jmp 0x1001b430
mov esi, dword [ebx + 8]
lea ecx, [esp + 0x20]
push 0
push ecx
shl esi, 5
push esi
push dword [ebx + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x1001b42b
cmp dword [esp + 0x20], esi
jne 0x1001b42b
mov eax, dword [esp + 0x24]
push ebx
mov dword [eax + 0xc], 1
call fcn.1001a630
lea esi, [esp + 0x58]
add esp, 4
lea ecx, [esi + 1]
mov al, byte [esi]
inc esi
test al, al
jne 0x1001b3c4
sub esi, ecx
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [esp + 0x28]
push eax
lea eax, [esp + 0x58]
push eax
lea eax, [esi - 4]
push eax
push str.built__.s.img_in__lu_ms
push 0
push dword [ebp + 0x18]
call fcn.10019a50
mov eax, dword [esp + 0x44]
lea eax, [eax*4 + 0x10128c78]
push eax
push dword [esp + 0x4c]
push dword [ebp + 0x18]
call fcn.1001abb0
add esp, 0x24
test eax, eax
jne 0x1001b421
push str.failed_to_hash_rebuilt_archive
push 2
push dword [ebp + 0x18]
call fcn.10019a50
add esp, 0xc
mov eax, 1
jmp 0x1001b4d1
mov eax, str.failed_to_write_file:__s
lea ecx, [esp + 0x54]
push ecx
push eax
mov eax, dword [ebp + 0x18]
push 1
push eax
call fcn.10019a50
push ebx
call fcn.1001a630
add esp, 0x14
jmp 0x1001b4cf
lea eax, [esp + 0x34]
push eax
push str.failed_to_read_file:__s
jmp 0x1001b465
lea eax, [esp + 0x34]
push eax
push str.invalid_file_size:__s
push 1
push dword [ebp + 0x18]
call fcn.10019a50
add esp, 0x10
push ebx
call fcn.1001a630
jmp 0x1001b4cc
test ecx, ecx
lea edx, [esp + 0x34]
lea eax, [esp + 0x54]
cmove eax, edx
push eax
push str.failed_to_open_file:__s
push 1
push dword [ebp + 0x18]
call fcn.10019a50
mov eax, dword [ebx]
add esp, 0x10
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp eax, 0xffffffff
je 0x1001b4aa
push eax
call esi
mov eax, dword [ebx + 4]
cmp eax, 0xffffffff
je 0x1001b4b5
push eax
call esi
cmp dword [ebx + 8], 0
je 0x1001b4c6
push dword [ebx + 0xc]
call fcn.100b8d0d
add esp, 4
push ebx
call fcn.100b8d0d
add esp, 4
xor eax, eax
mov ecx, dword [esp + 0x94]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.100af7bb
add esp, 0x88
ret