Function at 0x4f6880
Capabilities:
Write file on windows

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x88
mov r15, qword [rsp + 0xf8]
movsxd rax, edx
mov edi, r8d
mov dword [rsp + 0xd8], edx
mov rbp, rcx
add rax, rcx
and edi, 7
mov word [rsp + 0x46], r9w
mov qword [rsp + 0x38], rax
cmp edi, 2
je 0x4f6db0
cmp edi, 4
jne 0x4f68d3
and edx, 3
jne 0x4f6ef8
xor r12d, r12d
cmp rbp, qword [rsp + 0x38]
je 0x4f6b46
mov eax, r9d
and r8d, 8
xor r12d, r12d
mov r14, rbp
and eax, 1
mov dword [rsp + 0x40], r8d
mov r13d, r12d
mov word [rsp + 0x44], ax
lea rax, [rsp + 0x68]
mov qword [rsp + 0x48], rax
movzx esi, word [rsp + 0x44]
mov eax, 0
shl esi, 5
cmp rbp, r14
cmovne esi, eax
cmp edi, 2
je 0x4f6c58
jg 0x4f6a20
test edi, edi
je 0x4f6c78
cmp edi, 1
jne 0x4f6b40
movzx r9d, byte [r14]
add r14, 1
mov dword [rsp + 0x68], r9d
cmp qword [rsp + 0x38], r14
je 0x4f6a43
mov eax, dword [rsp + 0x40]
test eax, eax
jne 0x4f6a5d
cmp r9d, 0xffff
ja 0x4f6cb0
cmp r9d, 0xff
ja 0x4f6d60
or si, word [rsp + 0x46]
mov byte [rsp + 0x6f], r9b
mov eax, esi
and eax, 4
test r9b, r9b
js 0x4f6d18
movsxd rax, r9d
lea rbx, [0x005ef5a0]
movzx ecx, word [rbx + rax*2]
and ecx, esi
mov eax, ecx
test al, 0x61
je 0x4f6d10
test al, 8
jne 0x4f6e48
test r15, r15
je 0x4f69fe
mov r9, r15
mov r8d, 1
mov edx, 1
lea rcx, [0x005ef516]
call sym.fwrite
cmp rax, 1
jne 0x4f6b40
lea rcx, [rsp + 0x6f]
mov r9, r15
mov r8d, 1
mov edx, 1
call sym.fwrite
cmp rax, 1
jne 0x4f6b40
mov eax, 2
add r13d, eax
cmp qword [rsp + 0x38], r14
jne 0x4f6908
mov r12d, r13d
jmp 0x4f6b46
cmp edi, 4
jne 0x4f6b40
mov r9d, dword [r14]
add r14, 4
bswap r9d
mov dword [rsp + 0x68], r9d
cmp qword [rsp + 0x38], r14
jne 0x4f6953
mov eax, 0x40
cmp word [rsp + 0x44], 0
cmovne esi, eax
mov eax, dword [rsp + 0x40]
test eax, eax
je 0x4f695f
lea rbx, [rsp + 0x6f]
mov r8d, r9d
mov edx, 6
mov rcx, rbx
call sym.UTF8_putc
test eax, eax
jle 0x4f6a06
or si, word [rsp + 0x46]
sub eax, 1
mov qword [rsp + 0xf8], r15
mov r15, rbp
mov edx, esi
mov ecx, esi
lea r12, [rsp + rax + 0x70]
mov ebp, r13d
and edx, 4
and cx, 0x40f
mov dword [rsp + 0x58], edi
lea rax, [rsp + 0x67]
mov word [rsp + 0x5c], dx
lea rdx, [rsp + 0x75]
mov r13, qword [rsp + 0xf8]
mov rdi, rax
mov word [rsp + 0x5e], cx
mov qword [rsp + 0x50], rdx
nop dword [rax]
movzx eax, byte [rbx]
mov byte [rsp + 0x67], al
test al, al
js 0x4f6ba0
movzx edx, al
lea r10, [0x005ef5a0]
movzx r9d, al
movzx ecx, word [r10 + rdx*2]
and ecx, esi
mov edx, ecx
test cl, 0x61
je 0x4f6df0
and edx, 8
je 0x4f6c00
cmp qword [rsp + 0xf0], 0
je 0x4f6b16
mov rax, qword [rsp + 0xf0]
mov byte [rax], 1
test r13, r13
je 0x4f6b60
mov r9, r13
mov r8d, 1
mov edx, 1
mov rcx, rdi
call sym.fwrite
cmp rax, 1
je 0x4f6b60
nop word [rax + rax]
mov r12d, 0xffffffff
mov eax, r12d
add rsp, 0x88
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov eax, 1
add rbx, 1
add ebp, eax
cmp r12, rbx
jne 0x4f6ac8
mov qword [rsp + 0xf8], r13
mov edi, dword [rsp + 0x58]
mov r13d, ebp
mov rbp, r15
mov r15, qword [rsp + 0xf8]
cmp qword [rsp + 0x38], r14
jne 0x4f6908
jmp 0x4f6a11
cmp word [rsp + 0x5c], 0
movzx r9d, al
je 0x4f6b16
mov rcx, qword [rsp + 0x50]
lea r8, [0x005ef518]
mov edx, 0xb
call sym.BIO_snprintf
test r13, r13
je 0x4f6bed
mov rcx, qword [rsp + 0x50]
mov r9, r13
mov r8d, 3
mov edx, 1
call sym.fwrite
cmp rax, 3
jne 0x4f6b40
mov eax, 3
jmp 0x4f6b65
test r13, r13
je 0x4f6c49
mov r9, r13
mov r8d, 1
mov edx, 1
lea rcx, [0x005ef516]
call sym.fwrite
cmp rax, 1
jne 0x4f6b40
mov r9, r13
mov r8d, 1
mov edx, 1
mov rcx, rdi
call sym.fwrite
cmp rax, 1
jne 0x4f6b40
mov eax, 2
jmp 0x4f6b65
movzx r9d, word [r14]
add r14, 2
rol r9w, 8
movzx r9d, r9w
mov dword [rsp + 0x68], r9d
jmp 0x4f6948
mov r8, qword [rsp + 0x48]
mov edx, dword [rsp + 0xd8]
mov rcx, r14
call sym.UTF8_getc
test eax, eax
js 0x4f6b40
sub dword [rsp + 0xd8], eax
cdqe
mov r9d, dword [rsp + 0x68]
add r14, rax
jmp 0x4f6948
lea r12, [rsp + 0x75]
lea r8, str.W_08lX
mov edx, 0xb
mov rcx, r12
call sym.BIO_snprintf
test r15, r15
je 0x4f6cee
mov r9, r15
mov r8d, 0xa
mov edx, 1
mov rcx, r12
call sym.fwrite
cmp rax, 0xa
jne 0x4f6b40
mov eax, 0xa
add r13d, eax
cmp qword [rsp + 0x38], r14
jne 0x4f6908
jmp 0x4f6a11
and ax, 0x406
nop dword [rax]
test ax, ax
jne 0x4f6eb0
cmp r9d, 0x5c
je 0x4f6e70
test r15, r15
je 0x4f6d52
lea rcx, [rsp + 0x6f]
mov r9, r15
mov r8d, 1
mov edx, 1
call sym.fwrite
cmp rax, 1
jne 0x4f6b40
mov eax, 1
jmp 0x4f6cf3
lea r12, [rsp + 0x75]
lea r8, str.U_04lX
mov edx, 0xb
mov rcx, r12
call sym.BIO_snprintf
test r15, r15
je 0x4f6d9e
mov r9, r15
mov r8d, 6
mov edx, 1
mov rcx, r12
call sym.fwrite
cmp rax, 6
jne 0x4f6b40
mov eax, 6
jmp 0x4f6cf3
test byte [rsp + 0xd8], 1
je 0x4f68d3
mov r8d, 0x81
mov edx, 0x8e
mov ecx, 0xd
mov dword [rsp + 0x20], 0xa1
lea r9, str.crypto_asn1_a_strex.c
mov r12d, 0xffffffff
call sym.ERR_put_error
jmp 0x4f6b46
test cx, 0x406
jne 0x4f6bb0
cmp al, 0x5c
jne 0x4f6b16
cmp word [rsp + 0x5e], 0
je 0x4f6b16
test r13, r13
je 0x4f6c49
mov r9, r13
mov r8d, 2
mov edx, 1
lea rcx, [0x005ef51e]
call sym.fwrite
cmp rax, 2
jne 0x4f6b40
jmp 0x4f6c49
cmp qword [rsp + 0xf0], 0
je 0x4f6d2b
mov rax, qword [rsp + 0xf0]
mov byte [rax], 1
jmp 0x4f6d2b
test si, 0x40f
je 0x4f6d2b
test r15, r15
je 0x4f69fe
mov r9, r15
mov r8d, 2
mov edx, 1
lea rcx, [0x005ef51e]
call sym.fwrite
cmp rax, 2
jne 0x4f6b40
jmp 0x4f69fe
lea r12, [rsp + 0x75]
lea r8, [0x005ef518]
mov edx, 0xb
mov rcx, r12
call sym.BIO_snprintf
test r15, r15
je 0x4f6eee
mov r9, r15
mov r8d, 3
mov edx, 1
mov rcx, r12
call sym.fwrite
cmp rax, 3
jne 0x4f6b40
mov eax, 3
jmp 0x4f6cf3
mov r8d, 0x85
mov edx, 0x8e
mov ecx, 0xd
mov dword [rsp + 0x20], 0x9b
lea r9, str.crypto_asn1_a_strex.c
mov r12d, 0xffffffff
call sym.ERR_put_error
jmp 0x4f6b46