Function at 0x1400080b0
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x20
mov rbx, rdx
mov rdi, rcx
xor edx, edx
mov rcx, rbx
lea r8d, [rdx + 0x7c]
call sub.VCRUNTIME140.dll_memset
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_getc]
mov rcx, rdi
mov dword [rbx], eax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_getc]
shl eax, 8
mov rcx, rdi
or dword [rbx], eax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_getc]
shl eax, 0x10
mov rcx, rdi
or dword [rbx], eax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_getc]
shl eax, 0x18
or dword [rbx], eax
mov esi, dword [rbx]
lea eax, [rsi - 0xc]
cmp eax, 0x70
ja case.0x14000812f.13
lea rdx, [0x140000000]
movzx eax, byte [rdx + rax + 0x8728]
mov ecx, dword [rdx + rax*4 + 0x8720]
add rcx, rdx
jmp rcx
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_getc]
mov rcx, rdi
mov dword [rbx + 4], eax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_getc]
shl eax, 8
mov rcx, rdi
or dword [rbx + 4], eax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_getc]
shl eax, 0x10
mov rcx, rdi
or dword [rbx + 4], eax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_getc]
shl eax, 0x18
mov rcx, rdi
or dword [rbx + 4], eax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_getc]
mov rcx, rdi
mov dword [rbx + 8], eax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_getc]
shl eax, 8
mov rcx, rdi
or dword [rbx + 8], eax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_getc]
shl eax, 0x10
mov rcx, rdi
or dword [rbx + 8], eax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_getc]
shl eax, 0x18
mov rcx, rdi
or dword [rbx + 8], eax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_getc]
mov rcx, rdi
mov word [rbx + 0xc], ax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_getc]
shl ax, 8
mov rcx, rdi
or word [rbx + 0xc], ax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_getc]
mov rcx, rdi
mov word [rbx + 0xe], ax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_getc]
shl ax, 8
or word [rbx + 0xe], ax
jne 0x140008210
mov ecx, 2
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
xor r8d, r8d
lea rdx, str.Error__invalid_biBitCount__d_n
mov rcx, rax
call fcn.140002170
xor eax, eax
mov rbx, qword [rsp + 0x30]
mov rsi, qword [rsp + 0x38]
add rsp, 0x20
pop rdi
ret
mov eax, dword [rbx]
cmp eax, 0x28
jb 0x140008373
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_getc]
mov rcx, rdi
mov dword [rbx + 0x10], eax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_getc]
shl eax, 8
mov rcx, rdi
or dword [rbx + 0x10], eax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_getc]
shl eax, 0x10
mov rcx, rdi
or dword [rbx + 0x10], eax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_getc]
shl eax, 0x18
mov rcx, rdi
or dword [rbx + 0x10], eax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_getc]
mov rcx, rdi
mov dword [rbx + 0x14], eax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_getc]
shl eax, 8
mov rcx, rdi
or dword [rbx + 0x14], eax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_getc]
shl eax, 0x10
mov rcx, rdi
or dword [rbx + 0x14], eax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_getc]
shl eax, 0x18
mov rcx, rdi
or dword [rbx + 0x14], eax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_getc]
mov rcx, rdi
mov dword [rbx + 0x18], eax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_getc]
shl eax, 8
mov rcx, rdi
or dword [rbx + 0x18], eax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_getc]
shl eax, 0x10
mov rcx, rdi
or dword [rbx + 0x18], eax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_getc]
shl eax, 0x18
mov rcx, rdi
or dword [rbx + 0x18], eax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_getc]
mov rcx, rdi
mov dword [rbx + 0x1c], eax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_getc]
shl eax, 8
mov rcx, rdi
or dword [rbx + 0x1c], eax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_getc]
shl eax, 0x10
mov rcx, rdi
or dword [rbx + 0x1c], eax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_getc]
shl eax, 0x18
mov rcx, rdi
or dword [rbx + 0x1c], eax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_getc]
mov rcx, rdi
mov dword [rbx + 0x20], eax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_getc]
shl eax, 8
mov rcx, rdi
or dword [rbx + 0x20], eax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_getc]
shl eax, 0x10
mov rcx, rdi
or dword [rbx + 0x20], eax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_getc]
shl eax, 0x18
mov rcx, rdi
or dword [rbx + 0x20], eax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_getc]
mov rcx, rdi
mov dword [rbx + 0x24], eax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_getc]
shl eax, 8
or dword [rbx + 0x24], eax
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_getc]
shl eax, 0x10
mov rcx, rdi
or dword [rbx + 0x24], eax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_getc]
shl eax, 0x18
or dword [rbx + 0x24], eax
mov eax, dword [rbx]
cmp eax, 0x38
jb 0x1400084b6
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_getc]
mov rcx, rdi
mov dword [rbx + 0x28], eax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_getc]
shl eax, 8
mov rcx, rdi
or dword [rbx + 0x28], eax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_getc]
shl eax, 0x10
mov rcx, rdi
or dword [rbx + 0x28], eax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_getc]
shl eax, 0x18
or dword [rbx + 0x28], eax
mov esi, dword [rbx + 0x28]
jne 0x1400083d1
mov ecx, 2
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
lea rdx, str.Error__invalid_red_mask_value__d_n
jmp 0x140008701
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_getc]
mov rcx, rdi
mov dword [rbx + 0x2c], eax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_getc]
shl eax, 8
mov rcx, rdi
or dword [rbx + 0x2c], eax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_getc]
shl eax, 0x10
mov rcx, rdi
or dword [rbx + 0x2c], eax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_getc]
shl eax, 0x18
or dword [rbx + 0x2c], eax
mov esi, dword [rbx + 0x2c]
jne 0x140008426
mov ecx, 2
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
lea rdx, str.Error__invalid_green_mask_value__d_n
jmp 0x140008701
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_getc]
mov rcx, rdi
mov dword [rbx + 0x30], eax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_getc]
shl eax, 8
mov rcx, rdi
or dword [rbx + 0x30], eax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_getc]
shl eax, 0x10
mov rcx, rdi
or dword [rbx + 0x30], eax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_getc]
shl eax, 0x18
or dword [rbx + 0x30], eax
mov esi, dword [rbx + 0x30]
jne 0x14000847b
mov ecx, 2
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
lea rdx, str.Error__invalid_blue_mask_value__d_n
jmp 0x140008701
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_getc]
mov rcx, rdi
mov dword [rbx + 0x34], eax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_getc]
shl eax, 8
mov rcx, rdi
or dword [rbx + 0x34], eax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_getc]
shl eax, 0x10
mov rcx, rdi
or dword [rbx + 0x34], eax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_getc]
shl eax, 0x18
or dword [rbx + 0x34], eax
mov eax, dword [rbx]
cmp eax, 0x6c
jb 0x1400085ed
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_getc]
mov rcx, rdi
mov dword [rbx + 0x38], eax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_getc]
shl eax, 8
mov rcx, rdi
or dword [rbx + 0x38], eax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_getc]
shl eax, 0x10
mov rcx, rdi
or dword [rbx + 0x38], eax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_getc]
mov edx, 1
shl eax, 0x18
or dword [rbx + 0x38], eax
lea rcx, [rbx + 0x3c]
mov r9, rdi
lea r8d, [rdx + 0x23]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
cmp rax, 0x24
je 0x140008540
mov ecx, 2
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov rcx, rax
lea rdx, str.Error__cant__read_BMP_header_n
call fcn.140002170
xor eax, eax
mov rbx, qword [rsp + 0x30]
mov rsi, qword [rsp + 0x38]
add rsp, 0x20
pop rdi
ret
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_getc]
mov rcx, rdi
mov dword [rbx + 0x60], eax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_getc]
shl eax, 8
mov rcx, rdi
or dword [rbx + 0x60], eax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_getc]
shl eax, 0x10
mov rcx, rdi
or dword [rbx + 0x60], eax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_getc]
shl eax, 0x18
mov rcx, rdi
or dword [rbx + 0x60], eax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_getc]
mov rcx, rdi
mov dword [rbx + 0x64], eax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_getc]
shl eax, 8
mov rcx, rdi
or dword [rbx + 0x64], eax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_getc]
shl eax, 0x10
mov rcx, rdi
or dword [rbx + 0x64], eax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_getc]
shl eax, 0x18
mov rcx, rdi
or dword [rbx + 0x64], eax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_getc]
mov rcx, rdi
mov dword [rbx + 0x68], eax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_getc]
shl eax, 8
mov rcx, rdi
or dword [rbx + 0x68], eax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_getc]
shl eax, 0x10
mov rcx, rdi
or dword [rbx + 0x68], eax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_getc]
shl eax, 0x18
or dword [rbx + 0x68], eax
mov eax, dword [rbx]
cmp eax, 0x7c
jb 0x1400086da
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_getc]
mov rcx, rdi
mov dword [rbx + 0x6c], eax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_getc]
shl eax, 8
mov rcx, rdi
or dword [rbx + 0x6c], eax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_getc]
shl eax, 0x10
mov rcx, rdi
or dword [rbx + 0x6c], eax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_getc]
shl eax, 0x18
mov rcx, rdi
or dword [rbx + 0x6c], eax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_getc]
mov rcx, rdi
mov dword [rbx + 0x70], eax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_getc]
shl eax, 8
mov rcx, rdi
or dword [rbx + 0x70], eax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_getc]
shl eax, 0x10
mov rcx, rdi
or dword [rbx + 0x70], eax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_getc]
shl eax, 0x18
mov rcx, rdi
or dword [rbx + 0x70], eax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_getc]
mov rcx, rdi
mov dword [rbx + 0x74], eax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_getc]
shl eax, 8
mov rcx, rdi
or dword [rbx + 0x74], eax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_getc]
shl eax, 0x10
mov rcx, rdi
or dword [rbx + 0x74], eax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_getc]
shl eax, 0x18
mov rcx, rdi
or dword [rbx + 0x74], eax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_getc]
mov rcx, rdi
mov dword [rbx + 0x78], eax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_getc]
shl eax, 8
mov rcx, rdi
or dword [rbx + 0x78], eax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_getc]
shl eax, 0x10
mov rcx, rdi
or dword [rbx + 0x78], eax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_getc]
shl eax, 0x18
or dword [rbx + 0x78], eax
mov eax, 1
mov rbx, qword [rsp + 0x30]
mov rsi, qword [rsp + 0x38]
add rsp, 0x20
pop rdi
ret
mov ecx, 2
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
lea rdx, str.Error__unknown_BMP_header_size__d_n
mov r8d, esi
mov rcx, rax
call fcn.140002170
mov rbx, qword [rsp + 0x30]
xor eax, eax
mov rsi, qword [rsp + 0x38]
add rsp, 0x20
pop rdi
ret