Function at 0x14026f040
Capabilities:
Write file on windows

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x68
mov rdi, qword [rsp + 0xd8]
movsxd rax, edx
mov ebp, r8d
mov dword [rsp + 0xb8], edx
mov r14, rcx
add rax, rcx
and ebp, 7
mov word [rsp + 0x32], r9w
mov qword [rsp + 0x20], rax
cmp ebp, 2
je 0x14026f510
cmp ebp, 4
jne 0x14026f090
and edx, 3
jne 0x14026f668
xor r12d, r12d
cmp r14, qword [rsp + 0x20]
je 0x14026f2de
mov eax, r9d
and r9d, 1
and r8d, 8
xor r12d, r12d
mov esi, r9d
and eax, 1
mov r15, r14
mov dword [rsp + 0x2c], r8d
shl esi, 5
mov qword [rsp + 0xb0], r14
mov r14d, r12d
mov byte [rsp + 0x35], al
mov word [rsp + 0x30], si
cmp ebp, 2
je 0x14026f1e4
jg 0x14026f2f8
test ebp, ebp
je 0x14026f3f0
cmp ebp, 1
jne 0x14026f2d8
movzx r9d, byte [r15]
add r15, 1
mov dword [rsp + 0x48], r9d
cmp qword [rsp + 0x20], r15
je 0x14026f205
mov eax, dword [rsp + 0x2c]
test eax, eax
jne 0x14026f21e
cmp r9d, 0xffff
ja 0x14026f428
cmp r9d, 0xff
ja 0x14026f4c8
or si, word [rsp + 0x32]
mov byte [rsp + 0x4f], r9b
mov eax, esi
and eax, 4
test r9b, r9b
js 0x14026f480
movsxd rax, r9d
lea rcx, [0x1403ac8e0]
movzx edx, word [rcx + rax*2]
and edx, esi
mov eax, edx
test al, 0x61
je 0x14026f478
test al, 8
jne 0x14026f5b8
test rdi, rdi
je 0x14026f1b4
mov r9, rdi
mov r8d, 1
mov edx, 1
lea rcx, [0x1403ac856]
call sub.msvcrt.dll_fwrite
cmp rax, 1
jne 0x14026f2d8
lea rcx, [rsp + 0x4f]
mov r9, rdi
mov r8d, 1
mov edx, 1
call sub.msvcrt.dll_fwrite
cmp rax, 1
jne 0x14026f2d8
mov eax, 2
add r14d, eax
nop dword [rax]
cmp qword [rsp + 0x20], r15
je 0x14026f6a8
xor esi, esi
cmp qword [rsp + 0xb0], r15
cmove si, word [rsp + 0x30]
cmp ebp, 2
jne 0x14026f0da
movzx r9d, word [r15]
add r15, 2
rol r9w, 8
movzx r9d, r9w
mov dword [rsp + 0x48], r9d
cmp qword [rsp + 0x20], r15
jne 0x14026f109
mov eax, 0x40
cmp byte [rsp + 0x35], 0
cmovne esi, eax
mov eax, dword [rsp + 0x2c]
test eax, eax
je 0x14026f115
lea rbx, [rsp + 0x4f]
mov r8d, r9d
mov edx, 6
mov rcx, rbx
call fcn.1402731b0
test eax, eax
jle 0x14026f1c0
or si, word [rsp + 0x32]
sub eax, 1
mov edx, esi
lea r13, [rsp + rax + 0x50]
movzx eax, byte [rbx]
mov r12d, esi
and dx, 0x40f
and r12d, 4
mov word [rsp + 0x36], dx
mov byte [rsp + 0x47], al
test al, al
js 0x14026f33c
nop word cs:[rax + rax]
movzx edx, al
lea r10, [0x1403ac8e0]
movzx r9d, al
movzx ecx, word [r10 + rdx*2]
and ecx, esi
mov edx, ecx
test cl, 0x61
je 0x14026f560
and edx, 8
je 0x14026f398
cmp qword [rsp + 0xd0], 0
je 0x14026f2af
mov rax, qword [rsp + 0xd0]
mov byte [rax], 1
test rdi, rdi
je 0x14026f318
lea rcx, [rsp + 0x47]
mov r9, rdi
mov r8d, 1
mov edx, 1
call sub.msvcrt.dll_fwrite
cmp rax, 1
je 0x14026f318
nop word [rax + rax]
mov r12d, 0xffffffff
mov eax, r12d
add rsp, 0x68
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
cmp ebp, 4
jne 0x14026f2d8
mov r9d, dword [r15]
add r15, 4
bswap r9d
mov dword [rsp + 0x48], r9d
jmp 0x14026f0fe
mov eax, 1
add rbx, 1
add r14d, eax
cmp r13, rbx
je 0x14026f1c0
movzx eax, byte [rbx]
mov byte [rsp + 0x47], al
test al, al
jns 0x14026f270
movzx r9d, al
test r12w, r12w
je 0x14026f2af
lea rcx, [rsp + 0x55]
lea r8, [0x1403ac858]
mov edx, 0xb
mov qword [rsp + 0x38], rcx
call fcn.1400b4e80
test rdi, rdi
je 0x14026f38c
mov rcx, qword [rsp + 0x38]
mov r9, rdi
mov r8d, 3
mov edx, 1
call sub.msvcrt.dll_fwrite
cmp rax, 3
jne 0x14026f2d8
mov eax, 3
jmp 0x14026f31d
test rdi, rdi
je 0x14026f3e3
mov r9, rdi
mov r8d, 1
mov edx, 1
lea rcx, [0x1403ac856]
call sub.msvcrt.dll_fwrite
cmp rax, 1
jne 0x14026f2d8
lea rcx, [rsp + 0x47]
mov r9, rdi
mov r8d, 1
mov edx, 1
call sub.msvcrt.dll_fwrite
cmp rax, 1
jne 0x14026f2d8
mov eax, 2
jmp 0x14026f31d
mov edx, dword [rsp + 0xb8]
lea r8, [rsp + 0x48]
mov rcx, r15
call fcn.140273000
test eax, eax
js 0x14026f2d8
sub dword [rsp + 0xb8], eax
cdqe
mov r9d, dword [rsp + 0x48]
add r15, rax
jmp 0x14026f0fe
lea r12, [rsp + 0x55]
lea r8, str.W_08lX
mov edx, 0xb
mov rcx, r12
call fcn.1400b4e80
test rdi, rdi
je 0x14026f466
mov r9, rdi
mov r8d, 0xa
mov edx, 1
mov rcx, r12
call sub.msvcrt.dll_fwrite
cmp rax, 0xa
jne 0x14026f2d8
mov eax, 0xa
add r14d, eax
jmp 0x14026f1c0
and ax, 0x406
nop dword [rax]
test ax, ax
jne 0x14026f620
cmp r9d, 0x5c
je 0x14026f5e0
test rdi, rdi
je 0x14026f4ba
lea rcx, [rsp + 0x4f]
mov r9, rdi
mov r8d, 1
mov edx, 1
call sub.msvcrt.dll_fwrite
cmp rax, 1
jne 0x14026f2d8
mov eax, 1
jmp 0x14026f46b
lea r12, [rsp + 0x55]
lea r8, str.U_04lX
mov edx, 0xb
mov rcx, r12
call fcn.1400b4e80
test rdi, rdi
je 0x14026f506
mov r9, rdi
mov r8d, 6
mov edx, 1
mov rcx, r12
call sub.msvcrt.dll_fwrite
cmp rax, 6
jne 0x14026f2d8
mov eax, 6
jmp 0x14026f46b
test byte [rsp + 0xb8], 1
je 0x14026f090
call fcn.140110230
mov edx, 0xa1
lea r8, [0x1403ac890]
lea rcx, str.crypto_asn1_a_strex.c
call fcn.140110360
xor r8d, r8d
mov edx, 0x81
mov ecx, 0xd
call fcn.140110450
mov r12d, 0xffffffff
jmp 0x14026f2de
test cx, 0x406
jne 0x14026f34a
cmp al, 0x5c
jne 0x14026f2af
cmp word [rsp + 0x36], 0
je 0x14026f2af
test rdi, rdi
je 0x14026f3e3
mov r9, rdi
mov r8d, 2
mov edx, 1
lea rcx, [0x1403ac85e]
call sub.msvcrt.dll_fwrite
cmp rax, 2
jne 0x14026f2d8
jmp 0x14026f3e3
cmp qword [rsp + 0xd0], 0
je 0x14026f493
mov rax, qword [rsp + 0xd0]
mov byte [rax], 1
jmp 0x14026f493
test si, 0x40f
je 0x14026f493
test rdi, rdi
je 0x14026f1b4
mov r9, rdi
mov r8d, 2
mov edx, 1
lea rcx, [0x1403ac85e]
call sub.msvcrt.dll_fwrite
cmp rax, 2
jne 0x14026f2d8
jmp 0x14026f1b4
lea r12, [rsp + 0x55]
lea r8, [0x1403ac858]
mov edx, 0xb
mov rcx, r12
call fcn.1400b4e80
test rdi, rdi
je 0x14026f65e
mov r9, rdi
mov r8d, 3
mov edx, 1
mov rcx, r12
call sub.msvcrt.dll_fwrite
cmp rax, 3
jne 0x14026f2d8
mov eax, 3
jmp 0x14026f46b
call fcn.140110230
mov edx, 0x9b
lea r8, [0x1403ac890]
lea rcx, str.crypto_asn1_a_strex.c
call fcn.140110360
xor r8d, r8d
mov edx, 0x85
mov ecx, 0xd
call fcn.140110450
mov r12d, 0xffffffff
jmp 0x14026f2de
mov r12d, r14d
jmp 0x14026f2de