Function at 0x1400298d0
Capabilities:
Encode data using xor
Get file attributes
Get file size
Hash data with crc32
Move file
Read file via mapping

Disassembly:
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x270]
sub rsp, 0x370
mov qword [rbp - 0x80], 0xfffffffffffffffe
mov qword [rsp + 0x3c8], rbx
mov rax, qword [0x1401310c8]
xor rax, rsp
mov qword [rbp + 0x260], rax
mov r14, r8
mov rsi, rdx
mov rbx, rcx
mov r8, rdx
lea rdx, [rbp - 0x38]
call fcn.140027c60
nop
mov dword [rsp + 0x58], 0xaecbae94
mov dword [rsp + 0x5c], 0xaecfaedd
mov dword [rsp + 0x60], 0xaeca
xor r12d, r12d
mov ecx, r12d
mov edx, r12d
mov edi, 0x5146
nop dword [rax + rax]
movzx eax, cx
sub ax, di
xor word [rsp + rdx*2 + 0x58], ax
inc ecx
movsxd rdx, ecx
cmp rdx, 5
jb 0x140029950
mov word [rsp + 0x62], r12w
lea r8, [rsp + 0x58]
lea rdx, [rbp - 0x38]
lea rcx, [rbp - 0x58]
call fcn.140017090
nop
mov dword [rsp + 0x48], 0xaed4ae94
mov dword [rsp + 0x4c], 0xaed9aed0
xor eax, eax
mov word [rsp + 0x50], ax
mov edx, r12d
mov rcx, r12
nop dword [rax]
movzx eax, dx
sub ax, di
xor word [rsp + rcx*2 + 0x48], ax
inc edx
movsxd rcx, edx
cmp rcx, 4
jb 0x1400299a0
mov word [rsp + 0x50], r12w
lea r8, [rsp + 0x48]
lea rdx, [rbp - 0x38]
lea rcx, [rbp - 0x18]
call fcn.140017090
nop
mov r8, rsi
lea rdx, [rbp + 8]
mov rcx, rbx
call fcn.140027d70
nop
lea rdx, [rbp - 0x38]
lea rcx, [rbp - 0x78]
call fcn.140021380
nop
mov rcx, rax
call fcn.14001d540
nop
mov r8, qword [rbp - 0x60]
cmp r8, 8
jb 0x140029a10
inc r8
mov rdx, qword [rbp - 0x78]
lea rcx, [rbp - 0x78]
call fcn.140007ea0
lea rcx, [rbp + 8]
cmp qword [rbp + 0x20], 8
cmovae rcx, qword [rbp + 8]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov r15d, 0xffffffff
cmp eax, r15d
je 0x14002a28d
test al, 0x10
jne 0x14002a28d
xor eax, eax
mov qword [rbp + 0x68], rax
xorps xmm0, xmm0
movdqa xmmword [rbp + 0x30], xmm0
mov qword [rbp + 0x40], r12
mov qword [rbp + 0x48], r12
mov qword [rbp + 0x50], r12
or r13, 0xffffffffffffffff
mov qword [rbp + 0x58], r13
mov qword [rbp + 0x60], pe_nt_image_headers64
mov dword [rbp + 0x68], 1
mov word [rbp + 0x6c], ax
mov byte [rbp + 0x6e], al
mov dword [rsp + 0x40], r12d
lea r8, [rsp + 0x40]
xor edx, edx
lea rcx, [rbp + 8]
call fcn.14001d0d0
test al, al
je 0x14002a226
mov eax, dword [rsp + 0x40]
test eax, eax
je 0x14002a226
mov qword [rbp + 0x48], r12
mov qword [rbp + 0x50], r12
mov qword [rbp + 0x58], r13
mov word [rbp + 0x6c], 0
mov edx, eax
lea rcx, [rbp + 0x30]
call fcn.14000f6b0
test al, al
je 0x14002a226
lea r8, [rsp + 0x40]
mov rbx, qword [rbp + 0x30]
mov rdx, rbx
lea rcx, [rbp + 8]
call fcn.14001d0d0
test al, al
je 0x14002a226
mov eax, dword [rsp + 0x40]
mov r10, qword [rbp + 0x48]
cmp rax, qword [rbp + 0x50]
cmovbe r10, rax
mov qword [rbp + 0x50], r10
mov qword [rbp + 0x48], r12
mov qword [rbp + 0x58], r13
mov r8d, r15d
mov r9, r12
mov rdi, r10
test r10, r10
je 0x140029b31
lea r11, [0x14010c2a0]
nop
movzx edx, byte [r9 + rbx]
movzx ecx, r8b
xor rdx, rcx
mov eax, r8d
shr eax, 8
mov r8d, dword [r11 + rdx*4]
xor r8d, eax
inc r9
cmp r9, r10
jb 0x140029b10
not r8d
cmp r8d, dword [rsi + 0x44]
jne 0x14002a1f8
mov dword [rbp + 0x1e0], 0xd23578a2
mov dword [rbp + 0x1e4], 0xfacda7b7
mov dword [rbp + 0x1e8], 0x241a57c5
mov dword [rbp + 0x1ec], 0xbbe4756c
mov dword [rbp + 0x1f0], 0x520437d0
mov dword [rbp + 0x1f4], 0x9a308090
mov dword [rbp + 0x1f8], 0xa45402b2
mov dword [rbp + 0x1fc], 0x90b7e540
mov dword [rbp + 0x200], 0x38c31d49
mov dword [rbp + 0x204], 0x4463907b
mov dword [rbp + 0x208], 0xe2df7c26
mov dword [rbp + 0x20c], 0x3127a98d
mov dword [rbp + 0x210], 0xc29c193a
mov dword [rbp + 0x214], 0x21a878d8
mov dword [rbp + 0x218], 0xb41f9a47
mov dword [rbp + 0x21c], 0xdfb92852
mov dword [rbp + 0x220], 0x4fd9889f
mov dword [rbp + 0x224], 0x403facb0
mov dword [rbp + 0x228], 0x142bbfd3
mov dword [rbp + 0x22c], 0x80d4d9f
mov dword [rbp + 0x230], 0x276923da
mov dword [rbp + 0x234], 0xcfb7f448
mov dword [rbp + 0x238], 0xdfefa173
mov dword [rbp + 0x23c], 0xfdf0ad70
mov dword [rbp + 0x240], 0x443fec1
mov dword [rbp + 0x244], 0x8d7fd7ce
mov dword [rbp + 0x248], 0x19ee5cd8
mov dword [rbp + 0x24c], 0xf980944d
mov dword [rbp + 0x250], 0x2fd9178d
mov dword [rbp + 0x254], 0xaa9792be
mov dword [rbp + 0x258], 0xfda0ad0
mov dword [rbp + 0x25c], 0x25ce5fbb
xor edx, edx
mov r8d, 0x100
lea rcx, [rbp + 0x92]
call fcn.14009cd20
mov word [rbp + 0x90], 0
xor r9b, r9b
nop
movzx eax, r9b
mov byte [rbp + rax + 0x92], r9b
add r9b, 1
jne 0x140029ca0
xor r10b, r10b
xor r11b, r11b
nop dword [rax + rax]
movzx eax, r9b
lea r8, [rbp + 0x92]
add r8, rax
movzx eax, r10b
movzx ecx, byte [rbp + rax + 0x1e0]
add cl, byte [r8]
add r11b, cl
movzx eax, r11b
lea rdx, [rbp + 0x92]
add rdx, rax
movzx ecx, byte [r8]
movzx eax, byte [rdx]
mov byte [r8], al
mov byte [rdx], cl
inc r10b
and r10b, 0x7f
add r9b, 1
jne 0x140029cc0
lea rdx, [rbp + 0x30]
lea rcx, [rbp + 0x90]
call fcn.140029840
cmp rdi, r15
ja 0x14002a1be
mov r8d, edi
mov rdx, rbx
lea rcx, [rbp - 0x58]
call fcn.14001d1c0
test al, al
je 0x14002a1be
lea rcx, [rbp - 0x58]
call fcn.140017cc0
cmp eax, dword [rsi + 0x40]
jne 0x14002a13a
mov dword [rbp + 0x1a0], 0xd048322a
mov dword [rbp + 0x1a4], 0xc38bb189
mov dword [rbp + 0x1a8], 0x79c26efa
mov dword [rbp + 0x1ac], 0x6262a651
mov dword [rbp + 0x1b0], 0xf2b15ca5
mov dword [rbp + 0x1b4], 0x64b269e6
mov dword [rbp + 0x1b8], 0x11b9820b
mov dword [rbp + 0x1bc], 0xdaf5a87e
mov dword [rbp + 0x1c0], 0xcfa49ec9
mov dword [rbp + 0x1c4], 0x9c655e65
mov dword [rbp + 0x1c8], 0x333a34ca
mov dword [rbp + 0x1cc], 0xc38c002a
mov dword [rbp + 0x1d0], 0xefca5266
mov dword [rbp + 0x1d4], 0x8bfdd4de
mov dword [rbp + 0x1d8], 0xabc9bc88
mov dword [rbp + 0x1dc], 0xefd785a6
cmp rdi, 2
jae 0x140029e19
lea rax, vtable.std::exception.0
mov qword [rsp + 0x68], rax
xor eax, eax
mov qword [rsp + 0x70], rax
mov qword [rsp + 0x78], rax
lea rdx, [0x14012e098]
lea rcx, [rsp + 0x68]
call fcn.14009d9d8
int3
movzx eax, word [rbx]
mov qword [rbp + 0x48], 2
cmp dword [rbp + 0x68], 1
je 0x140029e2e
ror ax, 8
mov ecx, 0x5a4d
cmp ax, cx
jne 0x140029f74
lea rcx, [rbp - 0x58]
cmp qword [rbp - 0x40], 8
cmovae rcx, qword [rbp - 0x58]
lea rdx, [rbp + 0x1a0]
call fcn.1400061a0
test al, al
jne 0x140029f74
xor r12b, r12b
lea rcx, [rbp - 0x58]
cmp qword [rbp - 0x40], 8
cmovae rcx, qword [rbp - 0x58]
xor edi, edi
mov qword [rsp + 0x30], rdi
mov dword [rsp + 0x28], pe_nt_image_headers64
mov dword [rsp + 0x20], 3
xor r9d, r9d
mov edx, 0x80000000
lea r8d, [rdi + 1]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rsi, rax
test rax, rax
je 0x140029f30
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, eax
test eax, eax
je 0x140029f22
mov qword [rsp + 0x28], rdi
mov dword [rsp + 0x20], ebx
xor r9d, r9d
xor edx, edx
lea r8d, [rdi + 2]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov r15, rax
lea rcx, [rax - 1]
cmp rcx, 0xfffffffffffffffd
ja 0x140029f1c
mov qword [rsp + 0x20], rbx
xor r9d, r9d
xor r8d, r8d
lea edx, [rdi + 4]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov rdi, rax
test rax, rax
je 0x140029f13
mov edx, ebx
mov rcx, rax
call fcn.140020c40
movzx r12d, al
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov r15d, 0xffffffff
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test r12b, r12b
jne 0x140029f71
lea rcx, [rbp - 0x58]
call fcn.140020e30
test al, al
jne 0x140029f71
test r14, r14
je 0x140029f64
lea r9, [rbp - 0x58]
cmp qword [rbp - 0x40], 8
cmovae r9, qword [rbp - 0x58]
lea r8, str.Could_not_verify_file_signature___File:__s_
mov edx, 2
mov rcx, r14
call fcn.14001e550
mov edi, 5
xor r12d, r12d
jmp 0x14002a166
xor r12d, r12d
lea rcx, [rbp - 0x38]
cmp qword [rbp - 0x20], 8
cmovae rcx, qword [rbp - 0x38]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, r15d
je 0x140029fbc
test al, 0x10
jne 0x140029fbc
lea rdx, [rbp - 0x18]
cmp qword [rbp], 8
cmovae rdx, qword [rbp - 0x18]
lea rcx, [rbp - 0x38]
cmp qword [rbp - 0x20], 8
cmovae rcx, qword [rbp - 0x38]
call qword [sym.imp.KERNEL32.dll_MoveFileW]
cmp eax, 1
sete r15b
jmp 0x14002a018
xor r15b, r15b
lea rdx, [rbp - 0x38]
lea rcx, [rbp + 0x70]
call fcn.140021380
nop
lea rcx, [rbp + 0x70]
cmp qword [rbp + 0x88], 8
cmovae rcx, qword [rbp + 0x70]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov ecx, 0xffffffff
cmp eax, ecx
je 0x140029ff1
test al, 0x10
je 0x140029ffb
lea rcx, [rbp + 0x70]
call fcn.14001d540
nop
mov r8, qword [rbp + 0x88]
cmp r8, 8
jb 0x14002a018
inc r8
mov rdx, qword [rbp + 0x70]
lea rcx, [rbp + 0x70]
call fcn.140007ea0
mov esi, r12d
nop dword [rax + rax]
lea rdx, [rbp - 0x38]
cmp qword [rbp - 0x20], 8
cmovae rdx, qword [rbp - 0x38]
lea rcx, [rbp - 0x58]
cmp qword [rbp - 0x40], 8
cmovae rcx, qword [rbp - 0x58]
mov r8d, 9
call qword [sym.imp.KERNEL32.dll_MoveFileExW]
cmp eax, 1
sete bl
test bl, bl
jne 0x14002a0b0
cmp esi, 3
jge 0x14002a0b0
test r14, r14
je 0x14002a09e
lea rdi, [rbp - 0x38]
cmp qword [rbp - 0x20], 8
cmovae rdi, qword [rbp - 0x38]
lea rbx, [rbp - 0x58]
cmp qword [rbp - 0x40], 8
cmovae rbx, qword [rbp - 0x58]
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x28], eax
mov qword [rsp + 0x20], rdi
mov r9, rbx
lea r8, str.Could_not_move_temp_file__s_to__s__Error:__u_
mov edx, 2
mov rcx, r14
call fcn.14001e550
inc esi
mov ecx, 0xfa
call qword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x14002a020
test r15b, r15b
je 0x14002a12a
lea rcx, [rbp - 0x18]
test bl, bl
je 0x14002a10a
cmp qword [rbp], 8
cmovae rcx, qword [rbp - 0x18]
mov qword [rsp + 0x30], r12
mov dword [rsp + 0x28], pe_nt_image_headers64
mov dword [rsp + 0x20], 3
xor r9d, r9d
mov edx, 0x10000
lea r8d, [r9 + 7]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rdi, rax
cmp rax, 0xffffffffffffffff
je 0x14002a12a
mov rcx, rax
call fcn.14001d350
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x14002a12a
lea rdx, [rbp - 0x38]
cmp qword [rbp - 0x20], 8
cmovae rdx, qword [rbp - 0x38]
cmp qword [rbp], 8
cmovae rcx, qword [rbp - 0x18]
call qword [sym.imp.KERNEL32.dll_MoveFileW]
jmp 0x14002a133
test bl, bl
je 0x14002a133
mov edi, r12d
jmp 0x14002a166
mov edi, 7
jmp 0x14002a166
test r14, r14
je 0x14002a161
lea r9, [rbp - 0x58]
cmp qword [rbp - 0x40], 8
cmovae r9, qword [rbp - 0x58]
lea r8, str.Final_checksum_for_file__s_is_invalid
mov edx, 2
mov rcx, r14
call fcn.14001e550
mov edi, 6
lea rcx, [rbp - 0x18]
cmp qword [rbp], 8
cmovae rcx, qword [rbp - 0x18]
mov qword [rsp + 0x30], r12
mov dword [rsp + 0x28], pe_nt_image_headers64
mov dword [rsp + 0x20], 3
xor r9d, r9d
mov edx, 0x10000
lea r8d, [r9 + 7]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rbx, rax
cmp rax, 0xffffffffffffffff
je 0x14002a252
mov rcx, rax
call fcn.14001d350
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x14002a252
test r14, r14
je 0x14002a24d
lea rbx, [rbp - 0x58]
cmp qword [rbp - 0x40], 8
cmovae rbx, qword [rbp - 0x58]
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x20], eax
mov r9, rbx
lea r8, str.Error_writing_to_game_temp_file.__File:__s__Error:__d_
mov edx, 2
mov rcx, r14
call fcn.14001e550
jmp 0x14002a24d
test r14, r14
je 0x14002a21f
lea r9, [rbp + 8]
cmp qword [rbp + 0x20], 8
cmovae r9, qword [rbp + 8]
lea r8, str.Cached_file_has_invalid_checksum.__File:__s_
mov edx, 2
mov rcx, r14
call fcn.14001e550
mov edi, 4
jmp 0x14002a252
test r14, r14
je 0x14002a24d
lea r9, [rbp + 8]
cmp qword [rbp + 0x20], 8
cmovae r9, qword [rbp + 8]
lea r8, str.Error_reading_cached_file.__File:__s_
mov edx, 2
mov rcx, r14
call fcn.14001e550
mov edi, 7
mov rcx, qword [rbp + 0x38]
test rcx, rcx
je 0x14002a28b
mov eax, r13d
lock xadd dword [rcx + 8], eax
cmp eax, 1
jne 0x14002a28b
mov rbx, qword [rbp + 0x38]
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax]
lock xadd dword [rbx + 0xc], r13d
cmp r13d, 1
jne 0x14002a28b
mov rcx, qword [rbp + 0x38]
mov rax, qword [rcx]
call qword [rax + htons]
nop
jmp 0x14002a292
mov edi, 4
mov r8, qword [rbp + 0x20]
cmp r8, 8
jb 0x14002a2ac
inc r8
mov rdx, qword [rbp + 8]
lea rcx, [rbp + 8]
call fcn.140007ea0
mov qword [rbp + 0x20], 7
mov qword [rbp + 0x18], r12
mov word [rbp + 8], r12w
mov r8, qword [rbp]
cmp r8, 8
jb 0x14002a2d7
inc r8
mov rdx, qword [rbp - 0x18]
lea rcx, [rbp - 0x18]
call fcn.140007ea0
mov qword [rbp], 7
mov qword [rbp - 8], r12
mov word [rbp - 0x18], r12w
mov r8, qword [rbp - 0x40]
cmp r8, 8
jb 0x14002a302
inc r8
mov rdx, qword [rbp - 0x58]
lea rcx, [rbp - 0x58]
call fcn.140007ea0
mov qword [rbp - 0x40], 7
mov qword [rbp - 0x48], r12
mov word [rbp - 0x58], r12w
mov r8, qword [rbp - 0x20]
cmp r8, 8
jb 0x14002a32d
inc r8
mov rdx, qword [rbp - 0x38]
lea rcx, [rbp - 0x38]
call fcn.140007ea0
mov eax, edi
mov rcx, qword [rbp + 0x260]
xor rcx, rsp
call fcn.1400784c0
mov rbx, qword [rsp + 0x3c8]
add rsp, 0x370
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret