Function at 0x100008570
Capabilities:
Read file via mapping

Disassembly:
push rdi
sub rsp, 0x40
mov qword [rsp + 0x30], 0xfffffffffffffffe
mov qword [rsp + 0x50], rbx
mov qword [rsp + 0x60], rbp
mov qword [rsp + 0x68], rsi
mov ebp, 0x10000
mov rdx, rbp
mov ecx, 0x42
call qword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov rbx, rax
test rax, rax
je 0x10001386d
and qword [rsp + 0x58], 0
lea r8, [rsp + 0x58]
mov edx, 1
mov rcx, rax
call qword [sym.imp.ole32.dll_CreateStreamOnHGlobal]
mov edi, eax
test eax, eax
js 0x10001388a
mov edi, 4
mov qword [rsp + 0x20], rdi
xor r9d, r9d
xor r8d, r8d
mov edx, edi
mov rcx, qword [0x100039178]
call qword [sym.imp.KERNEL32.dll_MapViewOfFile]
test rax, rax
je 0x1000138ab
mov esi, dword [rax]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
test eax, eax
je 0x1000138d6
lea eax, [rsi + 4]
cmp eax, ebp
ja 0x100013901
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
mov edx, edi
mov rcx, qword [0x100039178]
call qword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov rdi, rax
test rax, rax
je 0x10001391b
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GlobalLock]
test rax, rax
je 0x100013946
mov r8, rsi
lea rdx, [rdi + 4]
mov rcx, rax
call sub.msvcrt.dll_memcpy
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GlobalUnlock]
test eax, eax
jne 0x100008681
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x10001397a
lea r8, [0x1000390c8]
lea rdx, [0x100029d88]
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.ole32.dll_CoUnmarshalInterface]
mov ebx, eax
mov rcx, qword [rsp + 0x58]
test rcx, rcx
je 0x1000086ac
mov rdx, qword [rcx]
call qword [rdx + 0x10]
mov eax, ebx
mov rbx, qword [rsp + 0x50]
mov rbp, qword [rsp + 0x60]
mov rsi, qword [rsp + 0x68]
add rsp, 0x40
pop rdi
ret
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r11d, eax
movzx eax, ax
or eax, 0x80070000
test r11d, r11d
cmovle eax, r11d
jmp 0x1000086ae
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GlobalFree]
nop
mov rcx, qword [rsp + 0x58]
test rcx, rcx
je 0x1000138a4
mov rdx, qword [rcx]
call qword [rdx + 0x10]
mov eax, edi
jmp 0x1000086ae
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx ebx, ax
or ebx, 0x80070000
test eax, eax
cmovle ebx, eax
mov rcx, qword [rsp + 0x58]
test rcx, rcx
je 0x1000138cf
mov rdx, qword [rcx]
call qword [rdx + 0x10]
mov eax, ebx
jmp 0x1000086ae
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx ebx, ax
or ebx, 0x80070000
test eax, eax
cmovle ebx, eax
mov rcx, qword [rsp + 0x58]
test rcx, rcx
je 0x1000138fa
mov rdx, qword [rcx]
call qword [rdx + 0x10]
mov eax, ebx
jmp 0x1000086ae
mov rcx, qword [rsp + 0x58]
test rcx, rcx
je 0x100013911
mov rax, qword [rcx]
call qword [rax + 0x10]
mov eax, 0x800700a0
jmp 0x1000086ae
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx ebx, ax
or ebx, 0x80070000
test eax, eax
cmovle ebx, eax
mov rcx, qword [rsp + 0x58]
test rcx, rcx
je 0x10001393f
mov rdx, qword [rcx]
call qword [rdx + 0x10]
mov eax, ebx
jmp 0x1000086ae
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx ebx, ax
or ebx, 0x80070000
test eax, eax
cmovle ebx, eax
mov rcx, qword [rsp + 0x58]
test rcx, rcx
je 0x100013973
mov rdx, qword [rcx]
call qword [rdx + 0x10]
mov eax, ebx
jmp 0x1000086ae
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov rcx, qword [rsp + 0x58]
test rcx, rcx
je 0x100013992
mov rdx, qword [rcx]
call qword [rdx + 0x10]
mov eax, ebx
jmp 0x1000086ae