Function at 0x140054730
Capabilities:
Get file size
Read file on windows

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r14
push r15
lea rbp, [rsp - 0x220]
sub rsp, 0x320
mov rax, qword [0x140106010]
xor rax, rsp
mov qword [rbp + 0x210], rax
mov r15, r8
mov ebx, edx
mov rsi, rcx
mov rcx, qword [rcx + 8]
mov rax, qword [rcx]
mov r8d, edx
lea rdx, [rbp - 0x30]
mov rax, qword [rax + 0xa0]
call qword [case.0x14007fe1f.0]
nop
mov rcx, qword [rsi + 8]
cmp qword [rbp - 0x20], 0
jne 0x1400547a8
mov r9d, ebx
lea r8, str.__u_unknown
lea rdx, str.FunctionalComputeAuthenticode
call fcn.14003bcd0
xor dil, dil
jmp 0x140054b93
mov rax, qword [rcx]
mov edx, ebx
mov rax, qword [rax + 0xa8]
call qword [case.0x14007fe1f.0]
mov rdx, rax
mov dword [rsp + 0x20], 0x2000000
mov r9d, 1
mov r8d, 0xa0000000
lea rcx, [rbp - 0x30]
call fcn.14007ce70
mov rbx, rax
mov qword [rbp - 0x10], rax
dec rax
cmp rax, 0xfffffffffffffffd
ja 0x140054b7c
mov r9, qword [rsi + 0xe0]
test r9, r9
je 0x140054b7c
xor r12d, r12d
mov qword [rsp + 0x40], 0x50
mov qword [rsp + 0x60], 1
mov qword [rsp + 0x70], 1
mov qword [rbp - 0x78], r12
mov qword [rbp - 0x70], 0x20
lea rax, [rbp - 0x30]
cmp qword [rbp - 0x18], 8
cmovae rax, qword [rbp - 0x30]
mov qword [rbp - 0x68], rax
mov qword [rbp - 0x60], rbx
mov qword [rbp - 0x58], r12
mov qword [rsp + 0x48], r12
mov qword [rsp + 0x50], r12
mov qword [rsp + 0x58], 2
mov qword [rsp + 0x78], r12
mov qword [rbp - 0x80], r12
lea rax, [rbp - 0x70]
mov qword [rsp + 0x68], rax
mov dword [rbp - 0x50], 0xaac56b
mov dword [rbp - 0x4c], 0x11d0cd44
mov dword [rbp - 0x48], 0xc000c28c
mov dword [rbp - 0x44], 0xee95c24f
lea r8, [rsp + 0x40]
lea rdx, [rbp - 0x50]
xor ecx, ecx
mov rax, r9
call qword [case.0x14007fe1f.0]
mov r14d, eax
mov dword [rsp + 0x70], 2
lea r8, [rsp + 0x40]
lea rdx, [rbp - 0x50]
xor ecx, ecx
mov rax, qword [rsi + 0xe0]
call qword [case.0x14007fe1f.0]
test r14d, r14d
jne 0x1400549d2
lea r9, [rbp - 0x30]
cmp qword [rbp - 0x18], 8
cmovae r9, qword [rbp - 0x30]
lea r8, str.Signed__embedded_:__s
lea rdx, str.FunctionalComputeAuthenticode
mov rcx, qword [rsi + 8]
call fcn.14003bcd0
mov qword [rbp - 0x50], 0x2000000
mov qword [rbp - 0x40], r12
mov dword [rbp - 0x48], r12d
lea edx, [r12 + 1]
xor ecx, ecx
call fcn.140091bc0
mov qword [rbp - 0x40], r12
lea rdx, [rsp + 0x30]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x140054983
mov rax, qword [rbp - 0x50]
cmp qword [rsp + 0x30], rax
jg 0x140054983
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x140054983
mov ecx, dword [rsp + 0x30]
call fcn.140091f5c
mov qword [rbp - 0x40], rax
mov qword [rsp + 0x20], r12
lea r9, [rbp - 0x48]
mov r8d, dword [rsp + 0x30]
mov rdx, rax
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x140054983
mov qword [rsp + 0x20], r15
mov r9d, 0x400
lea r8, [rbp - 0x30]
lea rdx, [rbp - 0x48]
mov rcx, rsi
call fcn.140055040
jmp 0x140054992
mov r8, r15
lea rdx, [rbp - 0x30]
mov rcx, rsi
call fcn.140054f10
test al, al
jne 0x1400549bc
lea r9, [rbp - 0x30]
cmp qword [rbp - 0x18], 8
cmovae r9, qword [rbp - 0x30]
lea r8, str.Failed_to_get_PEM_certificate_from_file:__s
lea rdx, str.FunctionalComputeAuthenticode
mov rcx, qword [rsi + 8]
call fcn.14003bcd0
nop
mov edx, 1
mov rcx, qword [rbp - 0x40]
call fcn.140091bc0
mov dil, 1
jmp 0x140054b7f
cmp r14d, 0x800b0100
jne 0x140054b4a
xor edx, edx
mov r8d, 0x20c
lea rcx, [rbp]
call fcn.140096c20
mov qword [rbp - 0x50], r12
mov dword [rsp + 0x30], r12d
lea rax, [rsp + 0x30]
mov qword [rsp + 0x28], rax
lea rax, [rbp - 0x50]
mov qword [rsp + 0x20], rax
lea r9, [rbp]
mov r8, rbx
lea rdx, [rbp - 0x30]
mov rcx, rsi
call fcn.1400553a0
test al, al
je 0x140054b4a
mov eax, dword [rsp + 0x30]
mov dword [rsp + 0x28], eax
mov rdi, qword [rbp - 0x50]
mov qword [rsp + 0x20], rdi
lea r9, [rbp]
mov r8, rbx
lea rdx, [rbp - 0x30]
mov rcx, rsi
call 0x140054c00
mov r14d, eax
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_LocalFree]
test r14d, r14d
jne 0x140054b4a
lea r9, [rbp - 0x30]
cmp qword [rbp - 0x18], 8
cmovae r9, qword [rbp - 0x30]
lea r8, str.Signed__detached_:__s
lea rdx, str.FunctionalComputeAuthenticode
mov rcx, qword [rsi + 8]
call fcn.14003bcd0
mov qword [rbp - 0x50], r12
mov qword [rbp - 0x40], r12
mov qword [rbp - 0x38], 7
mov word [rbp - 0x50], r12w
lea rax, [rbp + 4]
mov r8, 0xffffffffffffffff
inc r8
cmp word [rax + r8*2], r12w
jne 0x140054aa5
lea rdx, [rbp + 4]
lea rcx, [rbp - 0x50]
call fcn.140009140
nop
mov r8, r15
lea rdx, [rbp - 0x50]
mov rcx, rsi
call fcn.140054f10
test al, al
sete dil
mov rdx, qword [rbp - 0x38]
cmp rdx, 8
jb 0x140054b12
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x50]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140054b0d
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140054bfa
call fcn.140091bc0
test dil, dil
je 0x140054b77
lea rax, [rbp - 0x30]
cmp qword [rbp - 0x18], 8
cmovae rax, qword [rbp - 0x30]
mov qword [rsp + 0x20], rax
lea r9, [rbp + 4]
lea r8, str.Failed_to_get_PEM_certificate_from_catalog:__s__file:__s
lea rdx, str.FunctionalComputeAuthenticode
mov rcx, qword [rsi + 8]
call fcn.14003bcd0
mov dil, 1
jmp 0x140054b7f
lea rax, [rbp - 0x30]
cmp qword [rbp - 0x18], 8
cmovae rax, qword [rbp - 0x30]
mov qword [rsp + 0x20], rax
mov r9d, r14d
lea r8, str.Not_signed___08X_:__s
lea rdx, str.FunctionalComputeAuthenticode
mov rcx, qword [rsi + 8]
call fcn.14003bcd0
mov dil, 1
jmp 0x140054b7f
xor dil, dil
lea rax, [rbx - 1]
cmp rax, 0xfffffffffffffffd
ja 0x140054b93
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop
mov rdx, qword [rbp - 0x18]
cmp rdx, 8
jb 0x140054bcf
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x30]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140054bca
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140054bf4
call fcn.140091bc0
movzx eax, dil
mov rcx, qword [rbp + 0x210]
xor rcx, rsp
call fcn.140091ba0
add rsp, 0x320
pop r15
pop r14
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret
call fcn.14009b188
nop
call fcn.14009b188
nop
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x138]
sub rsp, 0x238
mov rax, qword [0x140106010]
xor rax, rsp
mov qword [rbp + 0x120], rax
mov r13, r9
mov rbx, r8
mov qword [rsp + 0x28], rbx
mov rsi, rdx
mov r12, rcx
mov r15, qword [rbp + 0x1a0]
mov r14d, dword [rbp + 0x1a8]
xor edi, edi
mov dword [rsp + 0x20], edi
xor edx, edx
mov r8d, 0xf8
lea rcx, [rbp + 0x20]
call fcn.140096c20
lea rcx, [rbp + 0x20]
call fcn.140021720
nop
mov rax, qword [rbp + 0x30]
movsxd rcx, dword [rax + 4]
mov eax, 0x30
mov word [rbp + rcx + 0x88], ax
mov rax, qword [rbp + 0x30]
movsxd rcx, dword [rax + 4]
mov eax, dword [rbp + rcx + 0x48]
and eax, 0xfffff9ff
bts eax, 0xb
mov dword [rbp + rcx + 0x48], eax
mov rax, qword [rbp + 0x30]
movsxd rcx, dword [rax + 4]
or dword [rbp + rcx + 0x48], 4
test r14d, r14d
je 0x140054d06
mov rbx, r15
mov edi, r14d
nop dword [rax]
nop word [rax + rax]
mov edx, 2
lea rcx, [rsp + 0x48]
call fcn.1400949a4
mov rcx, qword [rbp + 0x30]
movsxd rdx, dword [rcx + 4]
lea rcx, [rbp + 0x30]
add rcx, rdx
mov rdx, qword [rax + 8]
mov rax, qword [rax]
call qword [case.0x14007fe1f.0]
movzx edx, byte [rbx]
lea rcx, [rbp + 0x30]
call fcn.140055a00
lea rbx, [rbx + 1]
sub rdi, 1
jne 0x140054cc0
mov rbx, qword [rsp + 0x28]
mov qword [rbp], rdi
mov qword [rbp + 0x10], rdi
mov qword [rbp + 0x18], 7
mov word [rbp], di
mov dword [rsp + 0x20], 4
xorps xmm0, xmm0
movups xmmword [rsp + 0x30], xmm0
mov rcx, qword [rbp + 0xa8]
mov eax, ecx
and al, 0x22
cmp al, 2
je 0x140054d63
mov rax, qword [rbp + 0x78]
mov r8, qword [rax]
test r8, r8
je 0x140054d63
mov rax, qword [rbp + 0x58]
mov rdx, qword [rax]
cmp r8, qword [rbp + 0xa0]
cmovb r8, qword [rbp + 0xa0]
sub r8, rdx
sar r8, 1
jmp 0x140054d9d
test cl, 4
jne 0x140054d93
mov rax, qword [rbp + 0x70]
mov rcx, qword [rax]
test rcx, rcx
je 0x140054d93
mov rax, qword [rbp + 0x50]
mov rdx, qword [rax]
mov rax, qword [rbp + 0x88]
movsxd r8, dword [rax]
add r8, r8
sub r8, rdx
add r8, rcx
sar r8, 1
jmp 0x140054d9d
mov r8, qword [rsp + 0x38]
mov rdx, qword [rsp + 0x30]
test rdx, rdx
je 0x140054dac
lea rcx, [rbp]
call fcn.140009140
nop
lea rcx, [rbp + 0x20]
call fcn.140020c80
nop
mov dword [rsp + 0x64], edi
mov dword [rbp - 0x7c], edi
mov dword [rbp - 0x6c], edi
mov dword [rbp - 0x58], edi
mov qword [rbp - 0x50], 0x40
mov qword [rbp - 0x1c], rdi
mov dword [rbp - 0x14], edi
lea rax, [r13 + 4]
mov qword [rbp - 0x48], rax
lea rax, [rbp]
cmp qword [rbp + 0x18], 8
cmovae rax, qword [rbp]
mov qword [rbp - 0x40], rax
cmp qword [rsi + 0x18], 8
jb 0x140054df6
mov rsi, qword [rsi]
mov qword [rbp - 0x38], rsi
mov qword [rbp - 0x30], rbx
mov qword [rbp - 0x28], r15
mov dword [rbp - 0x20], r14d
mov dword [rsp + 0x60], 0x50
mov qword [rsp + 0x68], rdi
mov qword [rsp + 0x70], rdi
mov qword [rsp + 0x78], 2
mov dword [rbp - 0x80], 2
mov dword [rbp - 0x70], 1
mov qword [rbp - 0x68], rdi
mov qword [rbp - 0x60], rdi
mov dword [rbp - 0x54], edi
lea rax, [rbp - 0x50]
mov qword [rbp - 0x78], rax
mov dword [rbp - 0x10], 0xaac56b
mov dword [rbp - 0xc], 0x11d0cd44
mov dword [rbp - 8], 0xc000c28c
mov dword [rbp - 4], 0xee95c24f
lea r8, [rsp + 0x60]
lea rdx, [rbp - 0x10]
xor ecx, ecx
mov rax, qword [r12 + 0xe0]
call qword [case.0x14007fe1f.0]
mov ebx, eax
mov dword [rbp - 0x70], 2
lea r8, [rsp + 0x60]
lea rdx, [rbp - 0x10]
xor ecx, ecx
mov rax, qword [r12 + 0xe0]
call qword [case.0x14007fe1f.0]
nop
mov rdx, qword [rbp + 0x18]
cmp rdx, 8
jb 0x140054ed6
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140054ed1
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140054efb
call fcn.140091bc0
mov eax, ebx
mov rcx, qword [rbp + 0x120]
xor rcx, rsp
call fcn.140091ba0
add rsp, 0x238
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret
call fcn.14009b188
int3