Function at 0x1400139d4
Capabilities:
Get disk information
Query environment variable

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x17]
sub rsp, 0xc8
mov rax, qword [0x1400b8288]
xor rax, rsp
mov qword [rbp + 7], rax
xor r14d, r14d
mov qword [rbp - 0x49], r9
mov qword [rbp - 0x59], rdx
mov rbx, rdx
mov dword [rbp - 0x71], r8d
mov rdi, rcx
mov dword [rbp - 0x69], r14d
mov esi, 1
mov qword [rbp - 0x39], r14
mov r15d, r14d
mov dword [rbp - 0x61], r14d
mov r13d, r14d
mov qword [rbp - 0x29], r14
mov qword [rbp - 0x31], r14
test rcx, rcx
je 0x140014130
cmp dword [rcx], 0xfeedf002
jne 0x140014130
test r8d, 0xf6ad0e41
jne 0x140014130
test rdx, rdx
je 0x140013a65
cmp word [rdx], r14w
je 0x140013a65
mov r9d, r8d
and r9d, 8
jmp 0x140013a83
mov r9d, r8d
and r9d, 8
jne 0x140013a78
mov ecx, 0xa1
jmp 0x140014135
lea rbx, [0x14009ea88]
mov qword [rbp - 0x59], rbx
call fcn.14002e5e4
mov qword [rbp - 0x21], rax
test rax, rax
jne 0x140013a99
lea ecx, [rax + 6]
jmp 0x140014135
test r9d, r9d
jne 0x140013ab2
mov rcx, rbx
call fcn.14000c064
test eax, eax
je 0x140014141
mov r8d, dword [rbp - 0x71]
mov eax, 0x6000
and r8d, eax
cmp r8d, eax
je 0x140014130
xor r8d, r8d
xor edx, edx
mov rcx, rbx
call fcn.14002f2f8
mov qword [rbp - 0x51], rax
mov rbx, rax
test rax, rax
je 0x140014141
mov r12d, dword [rbp + 0x7f]
test r12d, r12d
je 0x140013b34
mov rbx, qword [rbp - 0x49]
add rbx, 8
mov eax, dword [rbx - 8]
test dword [rbp - 0x71], eax
je 0x140013b24
mov rax, qword [rbx + 8]
test rax, rax
je 0x140013b24
movabs r10, 0xd29c0e4638dcab70
mov r9, qword [rbx]
lea r8, [rbp - 0x71]
mov rdx, qword [rbp - 0x59]
mov rcx, rdi
call qword [vtable._SH_n.0]
test eax, eax
je 0x140013b8a
inc r14d
add rbx, 0x30
cmp r14d, r12d
jb 0x140013af1
mov rbx, qword [rbp - 0x51]
test byte [rbp - 0x71], 8
je 0x140013b43
test dword [rbp - 0x71], 0x1000000
je 0x140013b95
lea rdx, [rbp - 0x31]
mov rcx, rbx
call fcn.14002fcbc
xor r12d, r12d
test eax, eax
js 0x140013b98
mov rcx, qword [rdi + 0x48]
mov rax, rdi
test rcx, rcx
cmovne rax, rcx
mov rax, qword [rax + 0x28]
mov qword [rbp - 0x29], rax
mov rax, rdi
je 0x140013b7d
mov rax, rcx
mov rcx, qword [rcx + 0x48]
test rcx, rcx
jne 0x140013b71
lea rcx, [rbp - 0x31]
mov dword [rbp - 0x61], esi
mov qword [rax + 0x28], rcx
jmp 0x140013b98
xor r12d, r12d
mov esi, r12d
jmp 0x14001403e
xor r12d, r12d
test byte [rbp - 0x71], 8
lea r14, str.WIMApplyImageInternal
jne 0x140013dea
lea rdx, [rbp - 0x41]
mov qword [rbp - 0x41], r12
mov rcx, rbx
or r14, 0xffffffffffffffff
call fcn.14002f99c
mov ebx, eax
mov r12d, eax
test eax, eax
jns 0x140013be9
and qword [rsp + 0x20], r13
lea rdx, str.onecore_base_ntsetupopktoolsosimagelibmain_restore.c
mov r9d, eax
lea rcx, str.WIMApplyImageInternal
mov r8d, 0x274
call fcn.140046874
jmp 0x140013c13
mov rcx, qword [rbp - 0x41]
call qword [sym.imp.KERNEL32.dll_GetDriveTypeW]
nop dword [rax + rax]
test eax, 0xfffffffa
jne 0x140013c13
cmp eax, 5
je 0x140013c13
mov r15d, 0xa1
xor eax, eax
mov dword [rbp - 0x69], r15d
mov esi, eax
mov ecx, dword [0x1400b82f4]
cmp ecx, 0xffffffff
jne 0x140013c8e
xorps xmm0, xmm0
lea rdx, [rbp - 0x19]
mov r8d, FDICreate
lea rcx, str.WIM_Apply_VerifyPath
movups xmmword [rbp - 0x19], xmm0
movups xmmword [rbp - 9], xmm0
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
nop dword [rax + rax]
mov dword [rbp - 0x65], eax
dec eax
cmp eax, 0xf
ja 0x140013c79
lea r8, [rbp - 0x65]
lea rdx, [0x14009e38c]
lea rcx, [rbp - 0x19]
call qword [sym.imp.msvcrt.dll_swscanf_s]
nop dword [rax + rax]
mov ecx, dword [0x1400b82f4]
test eax, eax
cmovg ecx, dword [rbp - 0x65]
jmp 0x140013c7f
mov ecx, dword [0x1400b82f4]
cmp ecx, 0xffffffff
mov rax, r13
cmove ecx, eax
mov dword [0x1400b82f4], ecx
cmp ecx, 1
jne 0x140013d3c
xor r12d, r12d
test ebx, ebx
js 0x140013d48
mov qword [rsp + 0x30], r12
lea r8d, [rcx + 6]
mov rcx, qword [rbp - 0x51]
xor r9d, r9d
mov dword [rsp + 0x28], 0x2200000
xor edx, edx
mov dword [rsp + 0x20], 3
call qword [sym.imp.KERNEL32.dll_CreateFileW]
nop dword [rax + rax]
mov r14, rax
cmp rax, 0xffffffffffffffff
jne 0x140013d02
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
movzx ebx, ax
or ebx, 0x80070000
test eax, eax
cmovle ebx, eax
test ebx, ebx
jns 0x140013d02
mov r9d, ebx
mov r8d, 0x2b6
jmp 0x140013d22
lea r8, [rbp - 0x39]
mov edx, 1
mov rcx, r14
call fcn.140042c2c
mov ebx, eax
test eax, eax
jns 0x140013d98
mov r9d, eax
mov r8d, 0x2be
lea rdx, str.onecore_base_ntsetupopktoolsosimagelibmain_restore.c
mov qword [rsp + 0x20], r12
lea rcx, str.WIMApplyImageInternal
call fcn.140046874
jmp 0x140013d48
or r14, 0xffffffffffffffff
test r12d, r12d
jns 0x140013daf
xor r12d, r12d
mov ecx, ebx
bt ebx, 0x1c
jae 0x140013d7b
call qword [sym.imp.ntdll.dll_RtlNtStatusToDosError]
nop dword [rax + rax]
cmp eax, 0x13d
jne 0x140013d68
mov r15d, ebx
jmp 0x140013d91
mov ecx, ebx
call qword [sym.imp.ntdll.dll_RtlNtStatusToDosError]
nop dword [rax + rax]
mov r15d, eax
jmp 0x140013d91
and ecx, 0x1fff0000
movzx eax, bx
cmp ecx, 0x70000
mov r15d, ebx
cmove r15d, eax
mov dword [rbp - 0x69], r15d
mov esi, r12d
cmp r14, 0xffffffffffffffff
je 0x140013db2
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop dword [rax + rax]
jmp 0x140013db2
xor r12d, r12d
mov rbx, qword [rbp - 0x41]
test rbx, rbx
je 0x140013ddb
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
nop dword [rax + rax]
mov r8, rbx
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
nop dword [rax + rax]
test esi, esi
je 0x14001403e
lea r14, str.WIMApplyImageInternal
test byte [rbp - 0x71], 4
je 0x140013e15
mov rcx, rdi
call fcn.14002e0d0
mov rcx, rax
call fcn.140027548
test eax, eax
jne 0x140013e15
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
jmp 0x140013b8d
test byte [rbp - 0x71], 8
jne 0x140013e5c
mov rbx, qword [rbp - 0x51]
mov rcx, rdi
mov rdx, rbx
call fcn.1400134f0
mov esi, eax
test eax, eax
jne 0x140013e5c
mov dword [rsp + 0x30], 0x2ee
lea r9, str.Failed_to_restore_wimboot_entries
mov qword [rsp + 0x28], r14
lea ecx, [rax + 1]
mov r8, rbx
mov dword [rsp + 0x20], r12d
mov rdx, rdi
call fcn.14002aaa0
jmp 0x14001403e
cmp qword [rdi + 0x48], r12
mov rax, rdi
mov edx, dword [rbp - 0x71]
mov rcx, rdi
cmovne rax, qword [rdi + 0x48]
mov r12d, dword [rax + 0x24]
call fcn.1400131a8
xor edx, edx
mov r14d, edx
cmp dword [rbp + 0x7f], edx
jbe 0x140013ed1
mov rbx, qword [rbp - 0x49]
mov r8d, dword [rbp - 0x71]
add rbx, 8
test dword [rbx - 8], r8d
je 0x140013ec4
mov rax, qword [rbx + 0x10]
test rax, rax
je 0x140013ec4
movabs r10, 0xbb7136783c5f8170
mov r9, qword [rbx]
mov rcx, rdi
mov rdx, qword [rbp - 0x59]
call qword [vtable._SH_n.0]
xor edx, edx
test eax, eax
je 0x140013f6b
mov r8d, dword [rbp - 0x71]
inc r14d
add rbx, 0x30
cmp r14d, dword [rbp + 0x7f]
jb 0x140013e8d
mov rcx, rdi
call fcn.14003693c
call fcn.14003101c
test rax, rax
je 0x140013eea
mov qword [rdi + 0xd8], rax
mov r14, qword [rbp - 0x21]
mov rbx, qword [r14]
test rbx, rbx
je 0x140013f1d
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
nop dword [rax + rax]
mov r8, rbx
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
nop dword [rax + rax]
test eax, eax
je 0x140013f1d
mov qword [r14], r13
mov rax, qword [rbp - 0x39]
mov rcx, qword [rbp - 0x51]
test rax, rax
cmovne rcx, rax
call fcn.14002f960
mov rdx, r14
mov qword [r14], rax
mov rcx, rdi
call fcn.140014268
xor edx, edx
mov r13d, eax
test eax, eax
jns 0x140013f76
mov qword [rsp + 0x20], rdx
lea rcx, str.WIMApplyImageInternal
lea rdx, str.onecore_base_ntsetupopktoolsosimagelibmain_restore.c
mov r9d, eax
mov r8d, 0x314
call fcn.140046874
xor edx, edx
mov esi, edx
mov rax, qword [rdi + 0x48]
mov rcx, rdi
jmp 0x140013fd3
mov r14d, edx
cmp dword [rbp + 0x7f], edx
jbe 0x140013f6d
mov rbx, qword [rbp - 0x49]
mov r8d, dword [rbp - 0x71]
add rbx, 8
test dword [rbx - 8], r8d
je 0x140013fbd
mov rax, qword [rbx + 0x18]
test rax, rax
je 0x140013fbd
movabs r10, 0xbb7136783c5f8170
mov r9, qword [rbx]
mov rcx, rdi
mov rdx, qword [rbp - 0x59]
call qword [vtable._SH_n.0]
xor edx, edx
test eax, eax
je 0x140013f6b
mov r8d, dword [rbp - 0x71]
inc r14d
add rbx, 0x30
cmp r14d, dword [rbp + 0x7f]
jae 0x140013f6d
jmp 0x140013f8a
mov rcx, rax
mov rax, qword [rax + 0x48]
test rax, rax
jne 0x140013fcc
mov dword [rcx + 0x24], r12d
xor r12d, r12d
test r13d, r13d
jns 0x14001403a
mov ecx, r13d
bt r13d, 0x1c
jae 0x14001401a
call qword [sym.imp.ntdll.dll_RtlNtStatusToDosError]
nop dword [rax + rax]
cmp eax, 0x13d
jne 0x140014006
mov r15d, r13d
jmp 0x140014031
mov ecx, r13d
call qword [sym.imp.ntdll.dll_RtlNtStatusToDosError]
nop dword [rax + rax]
mov r15d, eax
jmp 0x140014031
and ecx, 0x1fff0000
movzx eax, r13w
cmp ecx, 0x70000
mov r15d, r13d
cmove r15d, eax
mov dword [rbp - 0x69], r15d
mov esi, r12d
jmp 0x140014050
test esi, esi
jne 0x140014050
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
mov r15d, eax
mov dword [rbp - 0x69], eax
mov eax, dword [rbp + 0x7f]
test eax, eax
je 0x1400140a8
mov rbx, qword [rbp - 0x49]
mov r14d, eax
mov r15, qword [rbp - 0x59]
add rbx, 8
mov eax, dword [rbx - 8]
test dword [rbp - 0x71], eax
je 0x14001409a
cmp qword [rbx + 0x20], r12
je 0x14001409a
mov rax, qword [rbx]
mov dword [rax], esi
movabs r10, 0xbb7136783c5f8170
mov r9, qword [rbx]
mov rdx, r15
mov r8d, dword [rbp - 0x71]
mov rcx, rdi
mov rax, qword [rbx + 0x20]
call qword [vtable._SH_n.0]
add rbx, 0x30
sub r14, 1
jne 0x140014066
mov r15d, dword [rbp - 0x69]
cmp dword [rbp - 0x61], r12d
je 0x1400140c8
mov rax, qword [rdi + 0x48]
jmp 0x1400140bb
mov rdi, rax
mov rax, qword [rax + 0x48]
test rax, rax
jne 0x1400140b4
mov rax, qword [rbp - 0x29]
mov qword [rdi + 0x28], rax
test esi, esi
jne 0x1400140db
mov ecx, r15d
call qword [sym.imp.KERNEL32.dll_SetLastError]
nop dword [rax + rax]
mov rbx, qword [rbp - 0x39]
test rbx, rbx
je 0x140014104
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
nop dword [rax + rax]
mov r8, rbx
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
nop dword [rax + rax]
or dword [0x1400b82f4], 0xffffffff
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
nop dword [rax + rax]
mov r8, qword [rbp - 0x51]
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
nop dword [rax + rax]
mov eax, esi
jmp 0x140014143
mov ecx, 0x57
call qword [sym.imp.KERNEL32.dll_SetLastError]
nop dword [rax + rax]
xor eax, eax
mov rcx, qword [rbp + 7]
xor rcx, rsp
call fcn.140096bd0
add rsp, 0xc8
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret