Function at 0x180035210
Capabilities:
Copy file
Get file size

Disassembly:
push rbp
push rbx
lea rbp, [rsp - 0x6d8]
sub rsp, 0x7d8
mov rax, qword [0x180080920]
xor rax, rsp
mov qword [rbp + 0x6b0], rax
mov rbx, rcx
mov qword [rsp + 0x70], rcx
lea rcx, [rbp + 0x4a0]
mov qword [rsp + 0x800], rdi
xor edx, edx
mov r8d, 0x208
call fcn.18004c900
xor edx, edx
lea rcx, [rbp + 0x290]
mov r8d, 0x208
call fcn.18004c900
xorps xmm0, xmm0
lea rcx, [rsp + 0x78]
xor edi, edi
xor edx, edx
movdqu xmmword [rsp + 0x78], xmm0
mov qword [rsp + 0x48], rdi
mov qword [rbp - 0x78], rdi
call fcn.180014a70
cmp byte [0x180081330], dil
je 0x1800352be
lea rcx, [rbp + 0x290]
call fcn.18000d050
test al, al
je 0x1800352be
lea r8, [rbp + 0x4a0]
mov rdx, rbx
lea rcx, [rbp + 0x290]
call fcn.18000d3f0
test al, al
jne 0x1800352e2
mov r8d, 0x208
lea rcx, [rbp + 0x290]
xor edx, edx
call fcn.18004c900
mov rdx, rbx
lea rcx, [rbp + 0x4a0]
call qword [sym.imp.KERNEL32.dll_lstrcpyW]
xor r9d, r9d
mov qword [rsp + 0x7f8], rsi
mov qword [rsp + 0x30], rdi
lea rcx, [rbp + 0x4a0]
mov qword [rsp + 0x7c8], r14
mov edx, 0xe0000000
mov dword [rsp + 0x28], pe_nt_image_headers64
lea r8d, [r9 + 1]
mov qword [rsp + 0x7c0], r15
mov dword [rsp + 0x20], 3
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov qword [rsp + 0x60], rax
mov rbx, rax
cmp rax, 0xffffffffffffffff
je 0x180035794
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileSize]
xor r9d, r9d
mov qword [rsp + 0x28], rdi
mov esi, eax
xor edx, edx
mov rcx, rbx
mov dword [rsp + 0x20], esi
lea r8d, [r9 + 0x40]
call qword [sym.imp.KERNEL32.dll_CreateFileMappingA]
mov qword [rsp + 0x68], rax
mov r14, rax
test rax, rax
je 0x180035772
xor r9d, r9d
mov qword [rsp + 0x20], rdi
xor r8d, r8d
mov rcx, rax
lea edx, [r9 + 2]
call qword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov r15, rax
test rax, rax
je 0x180035772
mov r9, rax
mov byte [rsp + 0x20], 1
xor r8d, r8d
mov rdx, rbx
call fcn.180007830
test al, al
je 0x180035760
movsxd rdi, dword [r15 + 0x3c]
mov ecx, 0x10b
add rdi, r15
mov qword [rsp + 0x808], r12
mov qword [rsp + 0x7d0], r13
movzx eax, word [rdi + 0x18]
cmp ax, cx
jne 0x18003558f
mov edx, esi
mov qword [rsp + 0x50], rsi
lea rcx, [rsp + 0x78]
mov r13d, esi
call fcn.180014a70
mov r12, rax
test rax, rax
je 0x18003556a
mov r8d, esi
mov rdx, r15
mov rcx, rax
call fcn.18004c130
movzx r9d, word [rdi + 6]
movzx r8d, word [rdi + 0x14]
mov edx, r9d
add r8, 0x28
test r9d, r9d
je 0x18003551a
add r8, rdi
lea rcx, [rbp - 0x68]
nop word [rax + rax]
mov eax, dword [r8 + 4]
lea r8, [r8 + 0x28]
mov qword [rcx - 8], rax
lea rcx, [rcx + 0x18]
mov eax, dword [r8 - 0x28]
mov qword [rcx - 0x18], rax
mov eax, r9d
sub eax, edx
mov qword [rcx - 0x10], rax
add edx, 0xffffffff
jne 0x180035430
lea r8, [rbp - 0x68]
mov r11, r9
mov r10, r9
lea rdx, [rbp - 0x68]
mov r9, r11
nop word [rax + rax]
mov rax, qword [rdx - 8]
mov rcx, qword [r8 - 8]
cmp rax, rcx
jbe 0x180035491
mov qword [r8 - 8], rax
mov rax, qword [rdx]
mov qword [rdx - 8], rcx
mov rcx, qword [r8]
mov qword [r8], rax
mov qword [rdx], rcx
add rdx, 0x18
sub r9, 1
jne 0x180035470
add r8, 0x18
sub r10, 1
jne 0x180035460
lea r14, [rbp - 0x68]
mov r13, rdi
nop dword [rax]
movzx esi, word [r13 + 0x14]
mov rax, qword [r14 + 8]
mov rbx, qword [r14 - 8]
mov rdi, qword [r14]
mov r8, rdi
lea rax, [rax + rax*4]
shl rax, 3
lea rcx, [rbx + r12]
sub rax, r15
add rax, r12
add rsi, rax
mov edx, dword [rsi + r13 + 0x2c]
add rdx, r15
call fcn.18004c130
mov rcx, qword [rsp + 0x48]
lea r14, [r14 + 0x18]
inc ecx
mov dword [rsi + r13 + 0x2c], ebx
mov dword [rsi + r13 + 0x28], edi
movzx eax, word [r13 + 6]
mov qword [rsp + 0x48], rcx
cmp ecx, eax
jl 0x1800354b0
mov r13, qword [rsp + 0x50]
mov rbx, qword [rsp + 0x60]
mov esi, r13d
mov r14, qword [rsp + 0x68]
mov r8, r13
mov rdx, r12
mov rcx, r15
call fcn.18004c130
mov r9, r15
mov r8, r14
mov edx, esi
mov rcx, rbx
call fcn.18000dc30
cmp word [rbp + 0x290], 0
je 0x18003572a
mov rdx, qword [rsp + 0x70]
lea rcx, [rbp + 0x4a0]
xor r8d, r8d
call qword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
je 0x18003573e
mov bl, 1
jmp 0x180035740
mov r9, r15
mov r8, r14
mov edx, esi
mov rcx, rbx
call fcn.18000dc30
mov dl, 1
lea rcx, [rbp + 0x290]
call fcn.18000d220
xor bl, bl
jmp 0x18003574e
mov ecx, 0x20b
cmp ax, cx
jne 0x18003572e
mov rdx, rsi
mov qword [rsp + 0x50], rsi
lea rcx, [rsp + 0x78]
mov r13, rsi
call fcn.180014a70
mov r12, rax
test rax, rax
je 0x18003556a
mov r8, rsi
mov rdx, r15
mov rcx, rax
call fcn.18004c130
movzx r9d, word [rdi + 6]
movzx r8d, word [rdi + 0x14]
mov edx, r9d
add r8, 0x28
test r9d, r9d
je 0x1800356d7
add r8, rdi
lea rcx, [rbp - 0x68]
nop dword [rax]
mov eax, dword [r8 + 4]
lea r8, [r8 + 0x28]
mov qword [rcx - 8], rax
lea rcx, [rcx + 0x18]
mov eax, dword [r8 - 0x28]
mov qword [rcx - 0x18], rax
mov eax, r9d
sub eax, edx
mov qword [rcx - 0x10], rax
add edx, 0xffffffff
jne 0x1800355f0
lea r8, [rbp - 0x68]
mov r11, r9
mov r10, r9
lea rdx, [rbp - 0x68]
mov r9, r11
nop word [rax + rax]
mov rax, qword [rdx - 8]
mov rcx, qword [r8 - 8]
cmp rax, rcx
jbe 0x180035651
mov qword [r8 - 8], rax
mov rax, qword [rdx]
mov qword [rdx - 8], rcx
mov rcx, qword [r8]
mov qword [r8], rax
mov qword [rdx], rcx
add rdx, 0x18
sub r9, 1
jne 0x180035630
add r8, 0x18
sub r10, 1
jne 0x180035620
lea r14, [rbp - 0x68]
mov r13, rdi
nop dword [rax]
mov rax, qword [r14 + 8]
mov rbx, qword [r14 - 8]
mov rdi, qword [r14]
mov r8, rdi
lea rcx, [rax + rax*4]
movzx eax, word [r13 + 0x14]
lea rsi, [rax + rcx*8]
sub rsi, r15
lea rcx, [rbx + r12]
add rsi, r12
mov edx, dword [rsi + r13 + 0x2c]
add rdx, r15
call fcn.18004c130
mov rcx, qword [rsp + 0x48]
lea r14, [r14 + 0x18]
inc ecx
mov dword [rsi + r13 + 0x2c], ebx
mov dword [rsi + r13 + 0x28], edi
movzx eax, word [r13 + 6]
mov qword [rsp + 0x48], rcx
cmp ecx, eax
jl 0x180035670
mov r13, qword [rsp + 0x50]
mov rbx, qword [rsp + 0x60]
mov esi, r13d
mov r14, qword [rsp + 0x68]
mov r8, r13
mov rdx, r12
mov rcx, r15
call fcn.18004c130
mov r9, r15
mov r8, r14
mov edx, esi
mov rcx, rbx
call fcn.18000dc30
cmp word [rbp + 0x290], 0
je 0x18003572a
mov rdx, qword [rsp + 0x70]
lea rcx, [rbp + 0x4a0]
xor r8d, r8d
call qword [sym.imp.KERNEL32.dll_CopyFileW]
mov dl, 1
lea rcx, [rbp + 0x290]
test eax, eax
je 0x180035583
call fcn.18000d220
mov bl, 1
jmp 0x18003574e
mov r9, r15
mov r8, r14
mov edx, esi
mov rcx, rbx
call fcn.18000dc30
xor bl, bl
mov dl, 1
lea rcx, [rbp + 0x290]
call fcn.18000d220
mov r13, qword [rsp + 0x7d0]
mov r12, qword [rsp + 0x808]
jmp 0x1800357a4
mov r9, r15
mov r8, r14
mov edx, esi
mov rcx, rbx
call fcn.18000dc30
jmp 0x180035794
lea rdx, [rsp + 0x40]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetHandleInformation]
test eax, eax
je 0x180035794
test byte [rsp + 0x40], 2
jne 0x180035794
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov dl, 1
lea rcx, [rbp + 0x290]
call fcn.18000d220
xor bl, bl
mov rcx, qword [rsp + 0x78]
mov r15, qword [rsp + 0x7c0]
mov r14, qword [rsp + 0x7c8]
mov rdi, qword [rsp + 0x800]
mov rsi, qword [rsp + 0x7f8]
test rcx, rcx
je 0x1800357fb
mov rdx, qword [rbp - 0x78]
mov rax, rcx
sub rdx, rcx
cmp rdx, 0x1000
jb 0x1800357f6
mov rcx, qword [rcx - 8]
add rdx, 0x27
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x180035817
call fcn.180049e70
movzx eax, bl
mov rcx, qword [rbp + 0x6b0]
xor rcx, rsp
call fcn.180049ad0
add rsp, 0x7d8
pop rbx
pop rbp
ret
call fcn.1800503fc
int3