Function at 0x140101380
Capabilities:
Link many functions at runtime

Disassembly:
mov dword [rsp + 0x18], r8d
mov dword [rsp + 0x10], edx
mov qword [rsp + 8], rcx
push rsi
push rdi
sub rsp, 0x1d8
mov qword [rsp + 0x180], 0xfffffffffffffffe
mov r8, qword [rsp + 0x1f0]
add r8, 0xc
lea rdx, str.Close_disk__s
xor ecx, ecx
call fcn.1400dcf70
mov rax, qword [rsp + 0x1f0]
cmp dword [rax], 0
jg 0x1401013d4
mov eax, 1
jmp 0x140102298
cmp dword [rsp + 0x1f8], 0
je 0x140101a7e
mov rdx, qword [rsp + 0x1f0]
add rdx, 0xc
lea rcx, [rsp + 0x40]
call fcn.140002100
nop
mov rax, qword [rsp + 0x1f0]
mov ecx, dword [rax + 0x49c]
sub ecx, 1
mov rax, qword [rsp + 0x1f0]
mov dword [rax + 0x49c], ecx
mov rax, qword [rsp + 0x1f0]
cmp dword [rax + 0x49c], 0
jle 0x14010197f
mov r8, qword [rsp + 0x1f0]
add r8, 0xc
lea rdx, str.Disk__s_is_in_using
xor ecx, ecx
call fcn.1400dcf70
cmp dword [rsp + 0x200], 0
je 0x14010195e
mov rax, qword [rsp + 0x1f0]
cmp dword [rax + 0x4a0], 0
je 0x14010195e
lea rcx, [0x14021ee90]
call qword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov qword [rsp + 0x60], rax
cmp qword [rsp + 0x60], 0
jne 0x1401014a5
mov dword [rsp + 0xb4], 0
lea rcx, [rsp + 0x40]
call fcn.140001490
mov eax, dword [rsp + 0xb4]
jmp 0x140102298
lea rdx, [0x14021eeb0]
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [rsp + 0x58], rax
lea rdx, str.VixDiskLib_Open
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [rsp + 0x68], rax
lea rdx, [0x14021eed8]
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [rsp + 0x50], rax
lea rdx, [0x14021eef0]
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [rsp + 0x48], rax
mov rax, qword [rsp + 0x1f0]
cmp dword [rax], 1
jne 0x1401016e0
mov rcx, qword [rsp + 0x1f0]
mov rcx, qword [rcx + 0x4ac]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rcx, qword [rsp + 0x1f0]
mov rcx, qword [rcx + 0x40c]
call qword [rsp + 0x58]
mov rdx, qword [rsp + 0x1f0]
add rdx, 0xc
lea rcx, [rsp + 0xc0]
call fcn.1400f9670
mov qword [rsp + 0x188], rax
mov rax, qword [rsp + 0x188]
mov qword [rsp + 0x190], rax
mov rcx, qword [rsp + 0x190]
call fcn.14000f8f0
mov rdx, rax
lea rcx, [rsp + 0xb8]
call fcn.140002e10
mov qword [rsp + 0x198], rax
mov rax, qword [rsp + 0x198]
mov qword [rsp + 0x1a0], rax
mov rcx, qword [rsp + 0x1a0]
call fcn.140002ec0
lea r9, [rsp + 0x78]
mov r8d, 4
mov rdx, rax
mov rcx, qword [0x1403b3148]
call qword [rsp + 0x68]
mov qword [rsp + 0x70], rax
lea rcx, [rsp + 0xb8]
call fcn.140002ea0
nop
lea rcx, [rsp + 0xc0]
call fcn.140001490
mov rax, qword [rsp + 0x70]
and rax, 0xffff
test rax, rax
je 0x1401016b7
xor edx, edx
mov rcx, qword [rsp + 0x70]
call qword [rsp + 0x50]
mov qword [rsp + 0x80], rax
mov rdx, qword [rsp + 0x80]
lea rcx, [rsp + 0xc8]
call fcn.14000e700
mov qword [rsp + 0x1a8], rax
mov rax, qword [rsp + 0x1a8]
mov qword [rsp + 0x1b0], rax
mov rcx, qword [rsp + 0x1b0]
call fcn.1400118c0
mov r8, qword [rsp + 0x1f0]
add r8, 0xc
mov r9, rax
lea rdx, str._ERROR__Open_image__s_failed:__s
mov ecx, 1
call fcn.1400dcf70
nop
lea rcx, [rsp + 0xc8]
call fcn.140002ea0
mov rcx, qword [rsp + 0x80]
call qword [rsp + 0x48]
mov rcx, qword [rsp + 0x1f0]
mov rcx, qword [rcx + 0x4ac]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov dword [rsp + 0xd0], 0
lea rcx, [rsp + 0x40]
call fcn.140001490
mov eax, dword [rsp + 0xd0]
jmp 0x140102298
mov rcx, qword [rsp + 0x1f0]
mov rax, qword [rsp + 0x78]
mov qword [rcx + 0x40c], rax
mov rcx, qword [rsp + 0x1f0]
mov rcx, qword [rcx + 0x4ac]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov rax, qword [rsp + 0x1f0]
cmp dword [rax], 2
jne 0x140101733
mov rcx, qword [rsp + 0x1f0]
mov rcx, qword [rcx + 0x40c]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0x1f0]
add rcx, 0xc
xor r9d, r9d
mov r8d, 3
mov edx, 0x80000000
call fcn.1400fa1a0
mov rdx, rax
mov rax, qword [rsp + 0x1f0]
mov qword [rax + 0x40c], rdx
mov rax, qword [rsp + 0x1f0]
cmp dword [rax], 4
jne 0x140101890
mov rcx, qword [rsp + 0x1f0]
mov rcx, qword [rcx + 0x40c]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [rsp + 0x88], 0
mov dword [rsp + 0x8c], 0
jmp 0x140101782
mov eax, dword [rsp + 0x8c]
add eax, 1
mov dword [rsp + 0x8c], eax
cmp dword [rsp + 0x8c], 0x10
jge 0x14010185f
movsxd rcx, dword [rsp + 0x8c]
mov rax, qword [rsp + 0x1f0]
cmp qword [rax + rcx*8 + 0x414], 0xffffffffffffffff
jne 0x1401017b0
jmp 0x14010185f
movsxd rcx, dword [rsp + 0x8c]
mov rax, qword [rsp + 0x1f0]
cmp qword [rax + rcx*8 + 0x414], 0
jne 0x1401017d0
jmp 0x14010185f
movsxd rdi, dword [rsp + 0x8c]
mov qword [rsp + 0x38], 0
lea rax, [rsp + 0x88]
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
xor r9d, r9d
xor r8d, r8d
mov edx, 0x90020
mov rcx, qword [rsp + 0x1f0]
mov rcx, qword [rcx + rdi*8 + 0x414]
call qword [sym.imp.KERNEL32.dll_DeviceIoControl]
movsxd rdx, dword [rsp + 0x8c]
mov rcx, qword [rsp + 0x1f0]
mov rcx, qword [rcx + rdx*8 + 0x414]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
movsxd rdx, dword [rsp + 0x8c]
mov rax, qword [rsp + 0x1f0]
mov qword [rax + rdx*8 + 0x414], 0xffffffffffffffff
jmp 0x140101771
mov rcx, qword [rsp + 0x1f0]
add rcx, 0xc
xor r9d, r9d
mov r8d, 3
mov edx, 0x80000000
call fcn.1400fa1a0
mov rdx, rax
mov rax, qword [rsp + 0x1f0]
mov qword [rax + 0x40c], rdx
mov rax, qword [rsp + 0x1f0]
cmp dword [rax], 5
jne 0x14010194c
mov dword [rsp + 0x90], 0
mov qword [rsp + 0x38], 0
lea rax, [rsp + 0x90]
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
xor r9d, r9d
xor r8d, r8d
mov edx, 0x90020
mov rcx, qword [rsp + 0x1f0]
mov rcx, qword [rcx + 0x414]
call qword [sym.imp.KERNEL32.dll_DeviceIoControl]
mov rcx, qword [rsp + 0x1f0]
mov rcx, qword [rcx + 0x414]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rdx, qword [rsp + 0x1f0]
mov qword [rdx + 0x414], 0xffffffffffffffff
mov rcx, qword [rsp + 0x1f0]
add rcx, 0xc
xor r9d, r9d
mov r8d, 3
mov edx, 0x80000000
call fcn.1400fa1a0
mov rdx, rax
mov rax, qword [rsp + 0x1f0]
mov qword [rax + 0x40c], rdx
mov rax, qword [rsp + 0x1f0]
mov dword [rax + 0x4a0], 0
mov dword [rsp + 0xd4], 1
lea rcx, [rsp + 0x40]
call fcn.140001490
mov eax, dword [rsp + 0xd4]
jmp 0x140102298
mov dword [rsp + 0x94], 0
jmp 0x14010199d
mov eax, dword [rsp + 0x94]
add eax, 1
mov dword [rsp + 0x94], eax
movsxd rdi, dword [rsp + 0x94]
lea rcx, [0x1403b4ee8]
call fcn.14001be50
cmp rdi, rax
jae 0x140101a74
movsxd rdx, dword [rsp + 0x94]
lea rcx, [0x1403b4ee8]
call fcn.14001fd00
mov rdx, rax
mov rax, qword [rsp + 0x1f0]
cmp qword [rdx], rax
jne 0x140101a6f
movsxd rdi, dword [rsp + 0x94]
lea rdx, [rsp + 0xe8]
lea rcx, [0x1403b4ee8]
call fcn.14001fcd0
mov r8, rdi
lea rdx, [rsp + 0xf8]
mov rcx, rax
call fcn.140028d20
lea rdi, [rsp + 0x170]
mov rsi, rax
mov ecx, reloc.OLEAUT32.dll_SafeArrayGetDim
rep movsb byte [rdi], byte [rsi]
lea rdi, [rsp + 0xd8]
lea rsi, [rsp + 0x170]
mov ecx, reloc.OLEAUT32.dll_SafeArrayGetDim
rep movsb byte [rdi], byte [rsi]
lea rdi, [rsp + 0x160]
lea rsi, [rsp + 0xd8]
mov ecx, reloc.OLEAUT32.dll_SafeArrayGetDim
rep movsb byte [rdi], byte [rsi]
lea r8, [rsp + 0x160]
lea rdx, [rsp + 0x108]
lea rcx, [0x1403b4ee8]
call fcn.140029fa0
jmp 0x140101a74
jmp 0x14010198c
lea rcx, [rsp + 0x40]
call fcn.140001490
mov rax, qword [rsp + 0x1f0]
cmp dword [rax], 3
jne 0x140101b08
mov rcx, qword [rsp + 0x1f0]
mov rcx, qword [rcx + 0x4ac]
call qword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
mov rax, qword [rsp + 0x1f0]
mov rax, qword [rax + 0x4ac]
mov qword [rsp + 0x118], rax
mov rcx, qword [rsp + 0x118]
call fcn.140072248
mov rax, qword [rsp + 0x1f0]
mov qword [rax + 0x4ac], 0
mov r8, qword [rsp + 0x1f0]
add r8, 0xc
lea rdx, [0x14021ef60]
xor ecx, ecx
call fcn.1400dcf70
mov rcx, qword [rsp + 0x1f0]
call fcn.1400f8c90
mov eax, 1
jmp 0x140102298
mov rax, qword [rsp + 0x1f0]
cmp dword [rax], 1
jne 0x140101c28
lea rcx, [0x14021ef88]
call qword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov qword [rsp + 0xa0], rax
cmp qword [rsp + 0xa0], 0
jne 0x140101b40
xor eax, eax
jmp 0x140102298
lea rdx, str.VixDiskLib_Close
mov rcx, qword [rsp + 0xa0]
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [rsp + 0x98], rax
mov rcx, qword [rsp + 0x1f0]
mov rcx, qword [rcx + 0x4ac]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rcx, qword [rsp + 0x1f0]
mov rcx, qword [rcx + 0x40c]
call qword [rsp + ILFree]
mov rcx, qword [rsp + 0x1f0]
mov rcx, qword [rcx + 0x4ac]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov rdx, qword [rsp + 0x1f0]
mov dword [rdx], 0
mov rcx, qword [rsp + 0x1f0]
mov rcx, qword [rcx + 0x4ac]
call qword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
mov rax, qword [rsp + 0x1f0]
mov rax, qword [rax + 0x4ac]
mov qword [rsp + 0x120], rax
mov rcx, qword [rsp + 0x120]
call fcn.140072248
mov rax, qword [rsp + 0x1f0]
mov qword [rax + 0x4ac], 0
mov r8, qword [rsp + 0x1f0]
add r8, 0xc
lea rdx, [0x14021efc0]
xor ecx, ecx
call fcn.1400dcf70
mov rcx, qword [rsp + 0x1f0]
call fcn.1400f8c90
mov eax, 1
jmp 0x140102298
mov rax, qword [rsp + 0x1f0]
cmp dword [rax], 4
jne 0x140101df4
mov rax, qword [rsp + 0x1f0]
cmp dword [rax + 0x4a0], 0
je 0x140101df4
mov rcx, qword [rsp + 0x1f0]
mov rcx, qword [rcx + 0x40c]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [rsp + 0xa8], 0
mov dword [rsp + 0xac], 0
jmp 0x140101c8c
mov eax, dword [rsp + 0xac]
add eax, 1
mov dword [rsp + 0xac], eax
cmp dword [rsp + 0xac], 0x10
jge 0x140101d69
movsxd rcx, dword [rsp + 0xac]
mov rax, qword [rsp + 0x1f0]
cmp qword [rax + rcx*8 + 0x414], 0xffffffffffffffff
jne 0x140101cba
jmp 0x140101d69
movsxd rcx, dword [rsp + 0xac]
mov rax, qword [rsp + 0x1f0]
cmp qword [rax + rcx*8 + 0x414], 0
jne 0x140101cda
jmp 0x140101d69
movsxd rdi, dword [rsp + 0xac]
mov qword [rsp + 0x38], 0
lea rax, [rsp + 0xa8]
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
xor r9d, r9d
xor r8d, r8d
mov edx, 0x90020
mov rcx, qword [rsp + 0x1f0]
mov rcx, qword [rcx + rdi*8 + 0x414]
call qword [sym.imp.KERNEL32.dll_DeviceIoControl]
movsxd rdx, dword [rsp + 0xac]
mov rcx, qword [rsp + 0x1f0]
mov rcx, qword [rcx + rdx*8 + 0x414]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
movsxd rdx, dword [rsp + 0xac]
mov rax, qword [rsp + 0x1f0]
mov qword [rax + rdx*8 + 0x414], 0xffffffffffffffff
jmp 0x140101c7b
mov rax, qword [rsp + 0x1f0]
mov dword [rax], 0
mov rcx, qword [rsp + 0x1f0]
mov rcx, qword [rcx + 0x4ac]
call qword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
mov rax, qword [rsp + 0x1f0]
mov rax, qword [rax + 0x4ac]
mov qword [rsp + 0x128], rax
mov rcx, qword [rsp + 0x128]
call fcn.140072248
mov rax, qword [rsp + 0x1f0]
mov qword [rax + 0x4ac], 0
mov r8, qword [rsp + 0x1f0]
add r8, 0xc
lea rdx, [0x14021efe8]
xor ecx, ecx
call fcn.1400dcf70
mov rcx, qword [rsp + 0x1f0]
call fcn.1400f8c90
mov eax, 1
jmp 0x140102298
mov rax, qword [rsp + 0x1f0]
cmp dword [rax], 5
jne 0x140101f1f
mov rax, qword [rsp + 0x1f0]
cmp dword [rax + 0x4a0], 0
je 0x140101f1f
mov dword [rsp + 0xb0], 0
mov qword [rsp + 0x38], 0
lea rax, [rsp + 0xb0]
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
xor r9d, r9d
xor r8d, r8d
mov edx, 0x90020
mov rcx, qword [rsp + 0x1f0]
mov rcx, qword [rcx + 0x414]
call qword [sym.imp.KERNEL32.dll_DeviceIoControl]
mov rcx, qword [rsp + 0x1f0]
mov rcx, qword [rcx + 0x414]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rdx, qword [rsp + 0x1f0]
mov qword [rdx + 0x414], 0xffffffffffffffff
mov rax, qword [rsp + 0x1f0]
mov dword [rax], 0
mov rcx, qword [rsp + 0x1f0]
mov rcx, qword [rcx + 0x4ac]
call qword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
mov rax, qword [rsp + 0x1f0]
mov rax, qword [rax + 0x4ac]
mov qword [rsp + 0x130], rax
mov rcx, qword [rsp + 0x130]
call fcn.140072248
mov rax, qword [rsp + 0x1f0]
mov qword [rax + 0x4ac], 0
mov r8, qword [rsp + 0x1f0]
add r8, 0xc
lea rdx, str.Unlock_disk__s
xor ecx, ecx
call fcn.1400dcf70
mov rcx, qword [rsp + 0x1f0]
call fcn.1400f8c90
mov eax, 1
jmp 0x140102298
mov rax, qword [rsp + 0x1f0]
cmp qword [rax + 0x494], 0
je 0x140101f62
xor r8d, r8d
mov edx, dword [rsp + 0x1f8]
mov rcx, qword [rsp + 0x1f0]
mov rcx, qword [rcx + 0x494]
call fcn.140101380
mov rdx, qword [rsp + 0x1f0]
mov qword [rdx + 0x494], 0
mov rax, qword [rsp + 0x1f0]
cmp dword [rax], 8
jne 0x140101fed
mov rax, qword [rsp + 0x1f0]
cmp dword [rax + 0x4a0], 0
je 0x140101fed
mov rax, qword [rsp + 0x1f0]
mov r9d, dword [rax + 0x4cc]
mov qword [rsp + 0x20], 0
mov r8, qword [rsp + 0x1f0]
mov r8, qword [r8 + 0x4c0]
mov rdx, qword [rsp + 0x1f0]
mov rdx, qword [rdx + 0x4d0]
mov rcx, qword [rsp + 0x1f0]
mov rcx, qword [rcx + 0x40c]
call fcn.1400fb650
mov rdx, qword [rsp + 0x1f0]
add rdx, 0x4b4
mov rcx, qword [rsp + 0x1f0]
mov rcx, qword [rcx + 0x40c]
call fcn.140109c10
mov rax, qword [rsp + 0x1f0]
cmp dword [rax], 8
jne 0x140102033
mov rax, qword [rsp + 0x1f0]
cmp qword [rax + 0x4c0], 0
je 0x140102033
mov rcx, qword [rsp + 0x1f0]
mov rcx, qword [rcx + 0x4c0]
call fcn.1400f8c90
mov rdx, qword [rsp + 0x1f0]
mov qword [rdx + 0x4c0], 0
mov rax, qword [rsp + 0x1f0]
cmp dword [rax], 2
jne 0x140102079
mov rax, qword [rsp + 0x1f0]
cmp qword [rax + 0xeb4], 0
je 0x140102079
mov rcx, qword [rsp + 0x1f0]
mov rcx, qword [rcx + 0xeb4]
call fcn.1400f8c90
mov rdx, qword [rsp + 0x1f0]
mov qword [rdx + 0xeb4], 0
mov rax, qword [rsp + 0x1f0]
cmp dword [rax], 2
jne 0x14010213b
mov rax, qword [rsp + 0x1f0]
cmp qword [rax + 0xebc], 0
je 0x14010213b
mov r8, qword [rsp + 0x1f0]
add r8, 0xc
lea rdx, [0x14021f028]
xor ecx, ecx
call fcn.1400dcf70
mov rcx, qword [rsp + 0x1f0]
mov rcx, qword [rcx + 0xebc]
call fcn.14010d2b0
mov rax, qword [rsp + 0x1f0]
mov rax, qword [rax + 0xebc]
mov qword [rsp + 0x140], rax
mov rax, qword [rsp + 0x140]
mov qword [rsp + 0x138], rax
cmp qword [rsp + 0x138], 0
je 0x14010211c
mov edx, 1
mov rcx, qword [rsp + 0x138]
call fcn.140029e80
mov qword [rsp + 0x1b8], rax
jmp 0x140102128
mov qword [rsp + 0x1b8], 0
mov rax, qword [rsp + 0x1f0]
mov qword [rax + 0xebc], 0
mov rax, qword [rsp + 0x1f0]
cmp dword [rax], 8
jne 0x1401021fd
mov rax, qword [rsp + 0x1f0]
cmp qword [rax + 0x153c], 0
je 0x1401021fd
mov r8, qword [rsp + 0x1f0]
add r8, 0xc
lea rdx, str.Release_disk_bitmap__s
xor ecx, ecx
call fcn.1400dcf70
mov rcx, qword [rsp + 0x1f0]
mov rcx, qword [rcx + 0x153c]
call fcn.14010d2b0
mov rax, qword [rsp + 0x1f0]
mov rax, qword [rax + 0x153c]
mov qword [rsp + 0x150], rax
mov rax, qword [rsp + 0x150]
mov qword [rsp + 0x148], rax
cmp qword [rsp + 0x148], 0
je 0x1401021de
mov edx, 1
mov rcx, qword [rsp + 0x148]
call fcn.140029e80
mov qword [rsp + 0x1c0], rax
jmp 0x1401021ea
mov qword [rsp + 0x1c0], 0
mov rax, qword [rsp + 0x1f0]
mov qword [rax + 0x153c], 0
mov rcx, qword [rsp + 0x1f0]
mov rcx, qword [rcx + 0x40c]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rdx, qword [rsp + 0x1f0]
mov dword [rdx], 0
mov rcx, qword [rsp + 0x1f0]
mov rcx, qword [rcx + 0x4ac]
call qword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
mov rax, qword [rsp + 0x1f0]
mov rax, qword [rax + 0x4ac]
mov qword [rsp + 0x158], rax
mov rcx, qword [rsp + 0x158]
call fcn.140072248
mov rax, qword [rsp + 0x1f0]
mov qword [rax + 0x4ac], 0
mov r8, qword [rsp + 0x1f0]
add r8, 0xc
lea rdx, str.Close_disk__s_OK
xor ecx, ecx
call fcn.1400dcf70
mov rcx, qword [rsp + 0x1f0]
call fcn.1400f8c90
mov eax, 1
add rsp, 0x1d8
pop rdi
pop rsi
ret