Function at 0x140046431
Capabilities:
Get common file path
Link many functions at runtime
Write file on windows

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x288
xor eax, eax
mov ebp, dword [rsp + 0x2f0]
mov rsi, rcx
lea rdi, [rsp + 0x78]
mov ecx, 0x82
mov rbx, r8
rep stosd dword [rdi], eax
mov r13, r9
mov rcx, rsi
xor r9d, r9d
mov dword [rsp + 0x6c], r9d
mov r12d, edx
lea rdi, [rsp + 0x78]
call fcn.1400449d3
mov rcx, rbx
mov qword [rsp + 0x50], rax
call fcn.1400449d3
mov rcx, r13
mov qword [rsp + 0x58], rax
call fcn.1400449d3
cmp qword [0x140112e50], 0
mov qword [rsp + 0x48], rax
jne 0x1400464f8
lea r15, str.Wimgapi
lea r14, str.WIMCreateFile
mov rcx, r15
call fcn.140044550
mov rdx, r14
mov rcx, rax
call qword [sym.imp.KERNEL32.DLL_GetProcAddress]
mov qword [0x140112e50], rax
test rax, rax
jne 0x1400464f8
call fcn.140036bd7
mov r8, r15
mov rdx, r14
lea rcx, [0x1400a2b36]
mov r9, rax
call fcn.140036717
xor ebx, ebx
xor r12d, r12d
xor r14d, r14d
jmp 0x1400467bd
cmp qword [0x140112e48], 0
jne 0x140046530
lea r15, str.Wimgapi
lea r14, str.WIMSetTemporaryPath
mov rcx, r15
call fcn.140044550
mov rdx, r14
mov rcx, rax
call qword [sym.imp.KERNEL32.DLL_GetProcAddress]
mov qword [0x140112e48], rax
test rax, rax
je 0x1400464d1
cmp qword [0x140112e40], 0
jne 0x14004656c
lea r15, str.Wimgapi
lea r14, str.WIMLoadImage
mov rcx, r15
call fcn.140044550
mov rdx, r14
mov rcx, rax
call qword [sym.imp.KERNEL32.DLL_GetProcAddress]
mov qword [0x140112e40], rax
test rax, rax
je 0x1400464d1
cmp qword [0x140112e20], 0
jne 0x1400465a8
lea r15, str.Wimgapi
lea r14, str.WIMExtractImagePath
mov rcx, r15
call fcn.140044550
mov rdx, r14
mov rcx, rax
call qword [sym.imp.KERNEL32.DLL_GetProcAddress]
mov qword [0x140112e20], rax
test rax, rax
je 0x1400464d1
cmp qword [0x140112e10], 0
jne 0x1400465e4
lea r15, str.Wimgapi
lea r14, str.WIMCloseHandle
mov rcx, r15
call fcn.140044550
mov rdx, r14
mov rcx, rax
call qword [sym.imp.KERNEL32.DLL_GetProcAddress]
mov qword [0x140112e10], rax
test rax, rax
je 0x1400464d1
test ebp, ebp
jne 0x1400465fa
mov r8d, r12d
mov rdx, rsi
lea rcx, str.Opening:__s:__d___API_
call fcn.140036717
mov rdx, rdi
mov ecx, 0x104
call qword [sym.imp.KERNEL32.DLL_GetTempPathW]
test eax, eax
jne 0x14004661d
call fcn.140036bd7
lea rcx, str.__Could_not_fetch_temp_path:__s
mov rdx, rax
jmp 0x140046675
mov rax, qword [0x1400b1a80]
xor r9d, r9d
mov edx, 0x80000000
cmp dword [rax + 0x420], 0xdffff
seta r9b
xor ecx, ecx
xor r8d, r8d
mov qword [rsp + 0x28], rcx
shl r9d, 0x1d
mov rcx, qword [rsp + 0x50]
mov dword [rsp + 0x20], r8d
mov r8d, 3
call qword [0x140112e50]
mov r14, rax
test rax, rax
jne 0x14004667f
call fcn.140036bd7
lea rcx, str.__Could_not_access_image:__s
mov rdx, rax
call fcn.140036717
jmp 0x1400464eb
mov rdx, rdi
mov rcx, rax
call qword [0x140112e48]
mov edi, eax
test eax, eax
jne 0x1400466a2
call fcn.140036bd7
lea rcx, str.__Could_not_set_temp_path:__s
mov rdx, rax
jmp 0x14004670a
test ebp, ebp
jne 0x1400466b8
mov r8, rbx
mov rdx, r13
lea rcx, str.Extracting:__s__From__s_
call fcn.140036717
test rbx, rbx
je 0x140046793
lea rdx, [0x1400a3397]
mov rcx, rbx
call sub.msvcrt.dll_strcmp
mov edi, eax
test eax, eax
jne 0x140046793
lea r12, [rsp + 0x6c]
lea rdx, [rsp + 0x70]
mov rcx, r14
mov r8, r12
call qword [0x140112e18]
test eax, eax
je 0x1400466fb
cmp dword [rsp + 0x6c], 0
jne 0x140046713
call fcn.140036bd7
lea rcx, str.__Could_not_access_WIM_info:__s
mov rdx, rax
call fcn.140036717
xor ebx, ebx
jmp 0x14004678e
xor edx, edx
mov rcx, qword [rsp + 0x48]
xor r9d, r9d
mov r8d, 1
mov qword [rsp + 0x30], rdx
mov edx, 0xc0000000
mov dword [rsp + 0x28], pe_nt_image_headers64
mov dword [rsp + 0x20], 2
call qword [sym.imp.KERNEL32.DLL_CreateFileW]
mov rbx, rax
cmp rax, 0xffffffffffffffff
jne 0x140046768
test ebp, ebp
jne 0x14004678e
call fcn.140036bd7
lea rcx, str.__Could_not_extract_file:__s
xor edi, edi
mov rdx, rax
call fcn.140036717
jmp 0x14004678e
xor eax, eax
mov r9, r12
mov r8d, dword [rsp + 0x6c]
mov rdx, qword [rsp + 0x70]
mov qword [rsp + 0x20], rax
mov rcx, rbx
xor r12d, r12d
call qword [sym.imp.KERNEL32.DLL_WriteFile]
test eax, eax
jne 0x1400467f9
jmp 0x14004674c
xor r12d, r12d
jmp 0x1400467fe
mov edx, r12d
mov rcx, r14
call qword [0x140112e40]
mov r12, rax
test rax, rax
jne 0x1400467c1
call fcn.140036bd7
lea rcx, str.__Could_not_set_index:__s
xor ebx, ebx
mov rdx, rax
call fcn.140036717
xor edi, edi
jmp 0x1400467fe
mov r8, qword [rsp + 0x48]
mov rdx, qword [rsp + 0x58]
xor r9d, r9d
mov rcx, rax
call qword [0x140112e20]
xor ebx, ebx
mov edi, eax
test eax, eax
jne 0x1400467f9
test ebp, ebp
jne 0x1400467fe
call fcn.140036bd7
lea rcx, str.__Could_not_extract_file:__s
mov rdx, rax
call fcn.140036717
jmp 0x1400467fe
mov edi, 1
mov rax, r14
or rax, r12
je 0x14004683a
test ebp, ebp
jne 0x140046819
mov rdx, rsi
lea rcx, str.Closing:__s
call fcn.140036717
mov rax, qword [0x140112e10]
test r12, r12
jne 0x140046830
mov rcx, r14
call qword [0x140112e10]
jmp 0x14004683a
mov rcx, r12
call rax
test r14, r14
jne 0x140046825
lea rax, [rbx - 1]
cmp rax, 0xfffffffffffffffd
ja 0x14004684d
mov rcx, rbx
call qword [sym.imp.KERNEL32.DLL_CloseHandle]
mov rcx, qword [rsp + 0x50]
call sub.msvcrt.dll_free
mov rcx, qword [rsp + 0x58]
call sub.msvcrt.dll_free
mov rcx, qword [rsp + 0x48]
call sub.msvcrt.dll_free
mov eax, edi
add rsp, 0x288
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret