Function at 0x140014e80
Capabilities:
Link many functions at runtime

Disassembly:
push rbx
push rbp
push rsi
push rdi
sub rsp, 0x1b8
mov rax, qword [0x1402878c8]
xor rax, rsp
mov qword [rsp + 0x190], rax
mov rdi, rdx
mov rbx, rcx
mov rcx, qword [rcx + 0x380]
xor esi, esi
mov edx, 0xffffffff
mov ebp, esi
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov rcx, qword [rbx + 0x380]
mov qword [rbx + 0x348], rsi
mov qword [rbx + 0x370], rsi
mov qword [rbx + 0x378], rsi
mov dword [rbx + 0x358], 0x1001
call qword [sym.imp.KERNEL32.dll_ReleaseMutex]
lea rcx, str.TmRimUpdate.dll
mov dword [rsp + 0x40], esi
call qword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov rcx, qword [rbx + 0x380]
mov edx, 0xffffffff
mov rsi, rax
test rax, rax
jne 0x140014f41
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov rcx, qword [rbx + 0x380]
movabs rax, 0x3ff8000000000000
mov dword [rbx + 0x358], 0x1000
mov qword [rbx + 0x348], rax
call qword [sym.imp.KERNEL32.dll_ReleaseMutex]
lea eax, [rsi - 1]
jmp 0x1400152ca
mov qword [rsp + 0x1f0], r12
mov qword [rsp + 0x1b0], r13
mov qword [rsp + 0x1a8], r14
mov qword [rsp + 0x1a0], r15
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
lea rdx, str.TMRDL_InitializeRimUpdateLib
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.TMRDL_DeInitializeRimUpdateLib
mov rcx, rsi
mov qword [rsp + 0x70], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.TMRDL_InitializeRimUpdateInstanceBasedOnSymLink
mov rcx, rsi
mov r14, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.TMRDL_DeInitializeRimUpdateInstance
mov rcx, rsi
mov qword [rsp + 0x48], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.TMRDL_StartUpdate
mov rcx, rsi
mov r15, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.TMRDL_StopUpdate
mov rcx, rsi
mov r12, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.TMRDL_UpdateRimFirmware
mov rcx, rsi
mov r13, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.TMRDL_GetCurrentUpdateProgress
mov rcx, rsi
mov qword [rsp + 0x50], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [rbx + 0x380]
mov qword [rbx + 0x378], rax
call qword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov rax, qword [rsp + 0x70]
test rax, rax
je 0x14001525b
test r14, r14
je 0x14001525b
cmp qword [rsp + 0x48], rbp
je 0x14001525b
test r15, r15
je 0x14001525b
test r12, r12
je 0x14001525b
test r13, r13
je 0x14001525b
cmp qword [rsp + 0x50], rbp
je 0x14001525b
cmp qword [rbx + 0x378], rbp
je 0x14001525b
xor ecx, ecx
lea r9, [rsp + 0x58]
mov qword [rsp + 0x28], rcx
lea r8, [rsp + 0x5c]
mov edx, 1
mov qword [rsp + 0x20], rcx
mov ecx, edx
call rax
cmp eax, 0x1001
je 0x14001509c
mov dword [rbx + 0x358], eax
jmp 0x140015265
mov rax, 0xffffffffffffffff
inc rax
cmp word [rdi + rax*2], bp
jne 0x1400150a3
mov r9, rdi
mov qword [rsp + 0x20], rax
mov r8d, 0x104
lea rdx, [rsp + 0x80]
lea rcx, [rsp + 0x78]
call fcn.1401ba380
xor eax, eax
lea r9, [rsp + 0x60]
mov qword [rsp + 0x30], rax
lea r8, [rsp + 0x64]
mov qword [rsp + 0x28], rax
lea rdx, [rsp + 0x68]
lea rax, [rsp + 0x40]
lea rcx, [rsp + 0x80]
mov qword [rsp + 0x20], rax
call qword [rsp + 0x48]
mov rdi, rax
mov eax, dword [rsp + 0x40]
cmp eax, 0x1001
jne 0x14001520d
xor r9d, r9d
mov qword [rbx + 0x370], rdi
xor r8d, r8d
lea rdx, [rsp + 0x40]
mov rcx, rdi
call r12
mov eax, dword [rsp + 0x40]
cmp eax, 0x1001
jne 0x14001520d
mov r8d, dword [rbx + 0x2c0]
lea rax, [rsp + 0x6c]
mov rdx, qword [rbx + 0x2b8]
xor r12d, r12d
mov qword [rsp + 0x38], r12
add r8d, 0xffffff80
mov qword [rsp + 0x30], r12
sub rdx, 0xffffffffffffff80
mov byte [rsp + 0x28], bpl
mov rcx, rdi
lea r9d, [r12 + 3]
mov qword [rsp + 0x20], rax
call qword [rsp + 0x50]
cmp eax, 0x1001
je 0x140015186
mov dword [rbx + 0x358], eax
lea ebp, [r12 - 1]
xor r9d, r9d
lea rdx, [rsp + 0x40]
xor r8d, r8d
mov rcx, rdi
call r13
mov eax, dword [rsp + 0x40]
cmp eax, 0x1001
je 0x1400151ad
mov dword [rbx + 0x358], eax
mov ebp, 0xffffffff
xor r8d, r8d
xor edx, edx
mov rcx, rdi
call r15
xor edx, edx
xor ecx, ecx
call r14
mov rcx, qword [rbx + 0x380]
mov edx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov rcx, qword [rbx + 0x380]
movabs rax, 0x3ff8000000000000
mov qword [rbx + 0x378], r12
mov qword [rbx + 0x348], rax
mov qword [rbx + 0x370], r12
call qword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, ebp
jmp 0x1400152aa
mov dword [rbx + 0x358], eax
mov rcx, qword [rbx + 0x380]
mov edx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov rcx, qword [rbx + 0x380]
xor eax, eax
mov qword [rbx + 0x378], rax
mov qword [rbx + 0x370], rax
call qword [sym.imp.KERNEL32.dll_ReleaseMutex]
test rdi, rdi
je 0x140015252
xor r8d, r8d
xor edx, edx
mov rcx, rdi
call r15
xor edx, edx
xor ecx, ecx
call r14
jmp 0x140015265
mov dword [rbx + 0x358], 0x1020
mov rcx, qword [rbx + 0x380]
mov edx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov rcx, qword [rbx + 0x380]
movabs rax, 0x3ff8000000000000
mov qword [rbx + 0x348], rax
mov qword [rbx + 0x370], rbp
call qword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, 0xffffffff
mov r14, qword [rsp + 0x1a8]
mov r13, qword [rsp + 0x1b0]
mov r12, qword [rsp + 0x1f0]
mov r15, qword [rsp + 0x1a0]
mov rcx, qword [rsp + 0x190]
xor rcx, rsp
call fcn.1401adf80
add rsp, 0x1b8
pop rdi
pop rsi
pop rbp
pop rbx
ret