Function at 0x1800367e0
Capabilities:
Copy file
Get file size

Disassembly:
mov qword [rsp + 0x18], rbx
mov qword [rsp + 0x20], rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x4a0
mov rax, qword [0x180080920]
xor rax, rsp
mov qword [rsp + 0x490], rax
mov byte [rsp + 0x40], r8b
mov r14d, edx
mov dword [rsp + 0x48], edx
mov r12, rcx
xor edx, edx
mov r8d, 0x208
lea rcx, [rsp + 0x280]
call fcn.18004c900
xor edx, edx
mov r8d, 0x208
lea rcx, [rsp + 0x70]
call fcn.18004c900
cmp byte [0x180081330], 0
je 0x180036872
lea rcx, [rsp + 0x70]
call fcn.18000d050
test al, al
je 0x180036872
lea r8, [rsp + 0x280]
mov rdx, r12
lea rcx, [rsp + 0x70]
call fcn.18000d3f0
test al, al
jne 0x180036895
mov r8d, 0x208
xor edx, edx
lea rcx, [rsp + 0x70]
call fcn.18004c900
mov rdx, r12
lea rcx, [rsp + 0x280]
call qword [sym.imp.KERNEL32.dll_lstrcpyW]
xor r13d, r13d
mov qword [rsp + 0x30], r13
mov dword [rsp + 0x28], pe_nt_image_headers64
mov dword [rsp + 0x20], 3
xor r9d, r9d
mov edx, 0xe0000000
lea r8d, [r13 + 1]
lea rcx, [rsp + 0x280]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rdi, rax
cmp rax, 0xffffffffffffffff
je 0x180036c7e
mov qword [rsp + 0x60], rax
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileSize]
lea ebx, [r14 + rax]
mov dword [rsp + 0x44], ebx
mov qword [rsp + 0x28], r13
mov dword [rsp + 0x20], ebx
xor r9d, r9d
xor edx, edx
lea r8d, [r13 + 0x40]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CreateFileMappingA]
mov r15, rax
test rax, rax
je 0x180036c5c
mov qword [rsp + 0x58], rax
mov qword [rsp + 0x20], r13
xor r9d, r9d
xor r8d, r8d
lea edx, [r13 + 2]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov rsi, rax
test rax, rax
je 0x180036c5c
mov qword [rsp + 0x50], rax
mov byte [rsp + 0x20], 1
mov r9, rax
xor r8d, r8d
mov rdx, rdi
call fcn.180007830
test al, al
je 0x180036c47
movsxd r8, dword [rsi + 0x3c]
add r8, rsi
movzx eax, word [r8 + 0x18]
mov ecx, 0x10b
cmp ax, cx
jne 0x180036977
mov ecx, r13d
jmp 0x18003698a
mov ecx, 0x20b
cmp ax, cx
jne 0x180036c47
mov ecx, 1
movzx eax, word [r8 + 6]
dec eax
movzx edx, word [r8 + 0x14]
test ecx, ecx
jne 0x180036af1
lea r10d, [rax + rax*4]
shl r10d, 3
add r10, rdx
add r10, r8
mov r11d, dword [r10 + 0x28]
lea ecx, [r14 + r11]
cmp byte [rsp + 0x40], 0
je 0x180036a71
mov r9d, dword [r8 + 0x3c]
xor edx, edx
mov eax, ecx
div r9d
sub ecx, edx
test edx, edx
je 0x1800369d3
add ecx, r9d
mov dword [r10 + 0x28], ecx
cmp r11d, 0x7fffffff
cmovbe r13d, r11d
sub ecx, r13d
mov r13d, ecx
sub r13d, r14d
mov eax, dword [r10 + 0x20]
sub dword [r8 + 0x50], eax
mov r9d, dword [r10 + 0x20]
add r9d, ecx
mov ecx, dword [r8 + 0x38]
xor edx, edx
mov eax, r9d
div ecx
test edx, edx
je 0x180036a0f
sub r9d, edx
add r9d, ecx
mov dword [r10 + 0x20], r9d
add dword [r8 + 0x50], r9d
test r13d, r13d
je 0x180036a75
mov r9, rsi
mov r8, r15
mov edx, ebx
mov rcx, rdi
call fcn.18000dc30
mov dword [rsp + 0x30], r13d
lea rax, [rsp + 0x50]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x58]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x44]
lea r8, [rsp + 0x60]
mov edx, 2
mov rcx, r12
call fcn.18000dad0
mov rsi, qword [rsp + 0x50]
mov r15, qword [rsp + 0x58]
mov ebx, dword [rsp + 0x44]
mov rdi, qword [rsp + 0x60]
jmp 0x180036a75
mov dword [r10 + 0x28], ecx
mov r9, rsi
mov r8, r15
mov edx, ebx
mov rcx, rdi
call fcn.18000dc30
cmp word [rsp + 0x70], 0
je 0x180036abf
mov dl, 1
lea rcx, [rsp + 0x70]
call fcn.18000d220
xor r8d, r8d
mov rdx, r12
lea rcx, [rsp + 0x280]
call qword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
je 0x180036ab8
mov al, 1
jmp 0x180036c8c
xor al, al
jmp 0x180036c8c
mov al, 1
jmp 0x180036c8c
lea r9d, [rax + rax*4]
shl r9d, 3
add r9, rdx
add r9, r8
mov r10d, dword [r9 + 0x28]
add r14d, r10d
cmp byte [rsp + 0x40], 0
je 0x180036bce
mov ecx, dword [r8 + 0x3c]
xor edx, edx
mov eax, r14d
div ecx
sub r14d, edx
test edx, edx
je 0x180036b26
add r14d, ecx
mov dword [r9 + 0x28], r14d
cmp r10d, 0x7fffffff
cmovbe r13d, r10d
sub r14d, r13d
mov ecx, dword [rsp + 0x48]
sub r14d, ecx
mov eax, dword [r9 + 0x20]
sub dword [r8 + 0x50], eax
add ecx, dword [r9 + 0x20]
mov r11d, dword [r8 + 0x38]
lea r10d, [rcx + r14]
xor edx, edx
mov eax, r10d
div r11d
sub r10d, edx
xor edx, edx
mov eax, ecx
div r11d
test edx, edx
je 0x180036b6c
add r10d, r11d
mov dword [r9 + 0x20], r10d
add dword [r8 + 0x50], r10d
test r14d, r14d
je 0x180036bd2
mov r9, rsi
mov r8, r15
mov edx, ebx
mov rcx, rdi
call fcn.18000dc30
mov dword [rsp + 0x30], r14d
lea rax, [rsp + 0x50]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x58]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x44]
lea r8, [rsp + 0x60]
mov edx, 2
mov rcx, r12
call fcn.18000dad0
mov rsi, qword [rsp + 0x50]
mov r15, qword [rsp + 0x58]
mov ebx, dword [rsp + 0x44]
mov rdi, qword [rsp + 0x60]
jmp 0x180036bd2
mov dword [r9 + 0x28], r14d
mov r9, rsi
mov r8, r15
mov edx, ebx
mov rcx, rdi
call fcn.18000dc30
cmp word [rsp + 0x70], 0
je 0x180036c1b
xor r8d, r8d
mov rdx, r12
lea rcx, [rsp + 0x280]
call qword [sym.imp.KERNEL32.dll_CopyFileW]
mov dl, 1
lea rcx, [rsp + 0x70]
test eax, eax
je 0x180036c12
call fcn.18000d220
mov al, 1
jmp 0x180036c8c
call fcn.18000d220
xor al, al
jmp 0x180036c8c
mov al, 1
jmp 0x180036c8c
sub ebx, r14d
mov r9, rsi
mov r8, r15
mov edx, ebx
mov rcx, rdi
call fcn.18000dc30
jmp 0x180036c7e
lea rdx, [rsp + 0x48]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetHandleInformation]
test eax, eax
je 0x180036c7e
test byte [rsp + 0x48], 2
jne 0x180036c7e
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov dl, 1
lea rcx, [rsp + 0x70]
call fcn.18000d220
xor al, al
mov rcx, qword [rsp + 0x490]
xor rcx, rsp
call fcn.180049ad0
lea r11, [rsp + 0x4a0]
mov rbx, qword [r11 + 0x40]
mov rsi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rdi
ret