Function at 0x140024638
Capabilities:
Query or enumerate registry value
Read file via mapping
Write file on windows

Disassembly:
mov dword [rsp + 0x18], r8d
mov qword [rsp + 0x10], rdx
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
mov rbp, rsp
sub rsp, 0x38
xor ebx, ebx
or rsi, 0xffffffffffffffff
xor r14d, r14d
mov r15, r9
mov edi, r8d
mov r13, rcx
lea eax, [rbx + 1]
mov r12d, 0x400000
test r9, r9
je 0x140024724
test byte [r9 + 4], 0x40
je 0x140024684
mov r12d, dword [r9 + 0x20]
and qword [rbp + 0x60], rbx
lea rax, [rbp + 0x60]
lea rdx, [0x14000c510]
mov r9d, 0x20019
xor r8d, r8d
mov rcx, 0xffffffff80000002
mov qword [rsp + 0x20], rax
xor edi, edi
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x1400246f8
mov rcx, qword [rbp + 0x60]
lea rax, [rbp + 0x68]
lea r9, [rbp + 0x50]
mov qword [rsp + 0x28], rax
lea rax, [rbp + 0x48]
lea rdx, [0x14000c560]
xor r8d, r8d
mov dword [rbp + 0x68], 4
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x1400246f8
cmp dword [rbp + 0x50], 4
jne 0x1400246f8
lea eax, [rdi + 1]
cmp dword [rbp + 0x48], eax
cmove edi, eax
mov rcx, qword [rbp + 0x60]
test rcx, rcx
je 0x140024707
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
test edi, edi
mov edi, dword [rbp + 0x58]
mov eax, 1
je 0x140024718
mov r14d, eax
jmp 0x140024724
test dword [r15 + 4], 0x400
cmovne r14d, eax
xor r15d, r15d
test r13, r13
je 0x14002491a
cmp r12d, 0x100000
jb 0x14002491a
test r14d, r14d
jne 0x140024794
mov r9d, 0x80
mov r8d, eax
mov edx, 0xc0000000
mov rcx, r13
call fcn.140014f40
mov rsi, rax
cmp rax, 0xffffffffffffffff
je 0x140024961
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
lea edx, [r15 + 8]
mov r8d, 0x1060
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rbx, rax
test rax, rax
jne 0x1400247ee
lea ecx, [rax + 8]
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x14002494e
xor r9d, r9d
xor edx, edx
or rcx, 0xffffffffffffffff
lea r8d, [r9 + 4]
mov qword [rsp + 0x28], r15
mov dword [rsp + 0x20], r12d
call qword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov rsi, rax
test rax, rax
je 0x14002494e
xor r9d, r9d
xor r8d, r8d
mov rcx, rax
lea edx, [r9 + 6]
mov qword [rsp + 0x20], r15
call qword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov rbx, rax
test rax, rax
je 0x14002494e
mov r8d, r12d
xor edx, edx
mov rcx, rax
call fcn.140039a40
xor edx, edx
movabs rax, 0x47455343534552
lea rcx, [rbx + 0x2c]
lea r8d, [rdx + 0x10]
mov dword [rbx + 8], 1
mov dword [rbx + 0xc], edi
mov qword [rbx], rax
mov qword [rbx + 0x10], r15
mov qword [rbx + 0x18], r15
mov dword [rbx + 0x20], r12d
mov qword [rbx + 0x24], r15
call fcn.140039a40
mov ecx, r15d
lea rdx, [rbx + 0x3c]
or dword [rdx], 0xffffffff
inc ecx
lea rdx, [rdx + 4]
movsxd rax, ecx
cmp rax, 4
jb 0x14002482b
mov dword [rbx + 0x4c], r14d
test r14d, r14d
jne 0x1400248c2
lea r9, [rbp + 0x68]
mov r8d, 0x1060
mov rdx, rbx
mov rcx, rsi
mov dword [rbp + 0x68], r15d
mov qword [rsp + 0x20], r15
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x140024925
cmp dword [rbp + 0x68], 0x1060
je 0x14002487f
lea ecx, [r14 + 0x18]
jmp 0x14002491f
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_FlushFileBuffers]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rbx
mov rcx, rax
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov r9d, 1
mov r8d, r12d
xor edx, edx
mov rcx, r13
mov dword [rsp + 0x20], r15d
call fcn.140018b40
mov rdi, rax
jmp 0x140024915
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8d, 0x30
lea r12d, [r8 - 0x28]
mov rcx, rax
mov edx, r12d
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rdi, rax
test rax, rax
jne 0x1400248eb
mov ecx, r12d
jmp 0x14002491f
mov rcx, r13
mov dword [rax], 3
call fcn.1400157e8
mov qword [rdi + 0x18], rax
test rax, rax
je 0x1400248e6
lea rax, [rbx + 0x1060]
mov qword [rdi + 8], rsi
mov qword [rdi + 0x20], rbx
mov qword [rdi + 0x28], rax
mov rax, rdi
jmp 0x140024963
mov ecx, 0x57
call qword [sym.imp.KERNEL32.dll_SetLastError]
test rbx, rbx
je 0x14002494e
test r14d, r14d
je 0x14002493a
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
jmp 0x14002494e
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rbx
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
lea rax, [rsi - 1]
cmp rax, 0xfffffffffffffffd
ja 0x140024961
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
add rsp, 0x38
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret