Function at 0x4cec70
Capabilities:
Write file on windows

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x58
xor edi, edi
movsxd r12, dword [rdx + 4]
mov byte [rsp + 0x35], 0
mov rsi, rcx
mov rbp, rdx
mov ebx, r8d
test r8b, 0x40
jne 0x4ceea0
test bl, 0x80
jne 0x4cede9
test bl, 0x20
je 0x4ceda0
mov eax, ebx
and eax, 0x10
cmp eax, 1
sbb r13d, r13d
and r13d, 0xfffffff8
add r13d, 9
lea rax, [rsp + 0x35]
mov rcx, qword [rbp + 8]
and ebx, 0x40f
mov r8d, r13d
mov qword [rsp + 0x28], 0
mov r9d, ebx
mov qword [rsp + 0x20], rax
mov edx, dword [rbp]
call sym.do_buf.constprop.0
test eax, eax
js 0x4ced80
cmp byte [rsp + 0x35], 0
lea r12d, [rdi + rax]
je 0x4cef10
add r12d, 2
test rsi, rsi
je 0x4ced86
mov r9, rsi
mov r8d, 1
mov edx, 1
lea rcx, [0x00793663]
call sym.fwrite
cmp rax, 1
jne 0x4ced80
mov rcx, qword [rbp + 8]
mov qword [rsp + 0x28], rsi
mov r9d, ebx
mov r8d, r13d
mov qword [rsp + 0x20], 0
mov edx, dword [rbp]
call sym.do_buf.constprop.0
test eax, eax
js 0x4ced80
cmp byte [rsp + 0x35], 0
je 0x4ced86
mov r9, rsi
mov r8d, 1
mov edx, 1
lea rcx, [0x00793663]
call sym.fwrite
cmp rax, 1
je 0x4ced86
nop dword [rax]
mov r12d, 0xffffffff
mov eax, r12d
add rsp, 0x58
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
lea eax, [r12 - 1]
cmp eax, 0x1d
ja 0x4cede0
lea rax, [0x00793690]
movsx r13d, byte [rax + r12]
mov eax, r13d
cmp r13b, 0xff
je 0x4cede0
test bl, 0x10
je 0x4cecc3
or eax, 8
test r13d, r13d
mov r13d, 1
movsx eax, al
cmovne r13d, eax
jmp 0x4cecc3
test bh, 1
je 0x4cecb0
test rsi, rsi
je 0x4cf030
mov r9, rsi
mov r8d, 1
mov edx, 1
lea rcx, [0x00793661]
call sym.fwrite
cmp rax, 1
jne 0x4ced80
and bh, 2
jne 0x4cef20
mov r12d, dword [rbp]
mov r14, qword [rbp + 8]
lea r13, [rsp + 0x40]
lea rbx, [0x00793670]
movsxd rbp, r12d
add rbp, r14
cmp rbp, r14
jne 0x4cee55
jmp 0x4cf03d
add r14, 1
cmp rbp, r14
je 0x4cf03d
movzx eax, byte [r14]
xor edx, edx
mov r9, rsi
mov r8d, 2
mov ecx, eax
and eax, 0xf
shr cl, 4
movzx eax, byte [rbx + rax]
and ecx, 0xf
mov dl, byte [rbx + rcx]
mov rcx, r13
mov dh, al
mov word [rsp + 0x40], dx
mov edx, 1
call sym.fwrite
cmp rax, 2
jne 0x4ced80
jmp 0x4cee48
mov ecx, r12d
call sym.ASN1_tag2str
mov rcx, rax
mov r13, rax
call sym.strlen
mov rdi, rax
test rsi, rsi
je 0x4cef00
movsxd r8, eax
mov r9, rsi
mov edx, 1
mov rcx, r13
call sym.fwrite
mov r8, rax
mov eax, edi
cmp r8, rax
jne 0x4ced80
mov r9, rsi
mov r8d, 1
mov edx, 1
lea rcx, [0x0079365f]
call sym.fwrite
cmp rax, 1
jne 0x4ced80
add edi, 1
jmp 0x4cec9e
test rsi, rsi
jne 0x4ced2e
jmp 0x4ced86
mov eax, dword [rbp + 4]
lea r14, [rsp + 0x40]
xor edx, edx
mov qword [rsp + 0x48], rbp
mov rcx, r14
mov dword [rsp + 0x40], eax
call sym.i2d_ASN1_TYPE
mov ebp, eax
test eax, eax
jle 0x4ced80
movsxd r12, eax
mov r8d, 0x11d
lea rdx, str..._openssl_3.1.1_crypto_asn1_a_strex.c
mov rcx, r12
call sym.CRYPTO_malloc
mov r13, rax
test rax, rax
je 0x4cf047
lea rdx, [rsp + 0x38]
mov rcx, r14
mov qword [rsp + 0x38], rax
call sym.i2d_ASN1_TYPE
test rsi, rsi
je 0x4ceff9
add r12, r13
mov r15, r13
lea r14, [rsp + 0x36]
lea rbx, [0x00793670]
nop word [rax + rax]
movzx eax, byte [r15]
xor edx, edx
mov r9, rsi
mov r8d, 2
mov ecx, eax
and eax, 0xf
shr cl, 4
movzx eax, byte [rbx + rax]
and ecx, 0xf
mov dl, byte [rbx + rcx]
mov rcx, r14
mov dh, al
mov word [rsp + 0x36], dx
mov edx, 1
call sym.fwrite
cmp rax, 2
je 0x4ceff0
mov r8d, 0x124
lea rdx, str..._openssl_3.1.1_crypto_asn1_a_strex.c
mov rcx, r13
call sym.CRYPTO_free
jmp 0x4ced80
add r15, 1
cmp r12, r15
jne 0x4cef98
lea r12d, [rbp + rbp]
mov r8d, 0x124
lea rdx, str..._openssl_3.1.1_crypto_asn1_a_strex.c
mov rcx, r13
call sym.CRYPTO_free
test r12d, r12d
js 0x4ced80
add r12d, 1
add r12d, edi
jmp 0x4ced86
and bh, 2
jne 0x4cef20
mov r12d, dword [rbp]
add r12d, r12d
jns 0x4cf01c
jmp 0x4ced80
call sym.ERR_new
lea r8, str.do_dump
mov edx, 0x11e
lea rcx, str..._openssl_3.1.1_crypto_asn1_a_strex.c
call sym.ERR_set_debug
xor r8d, r8d
mov edx, 0xc0100
mov ecx, 0xd
call sym.ERR_set_error
jmp 0x4ced80