Function at 0x14026f540
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 0x14026fa10
cmp ebp, 4
jne 0x14026f590
and edx, 3
jne 0x14026fb68
xor r12d, r12d
cmp r14, qword [rsp + 0x20]
je 0x14026f7de
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 0x14026f6e4
jg 0x14026f7f8
test ebp, ebp
je 0x14026f8f0
cmp ebp, 1
jne 0x14026f7d8
movzx r9d, byte [r15]
add r15, 1
mov dword [rsp + 0x48], r9d
cmp qword [rsp + 0x20], r15
je 0x14026f705
mov eax, dword [rsp + 0x2c]
test eax, eax
jne 0x14026f71e
cmp r9d, 0xffff
ja 0x14026f928
cmp r9d, 0xff
ja 0x14026f9c8
or si, word [rsp + 0x32]
mov byte [rsp + 0x4f], r9b
mov eax, esi
and eax, 4
test r9b, r9b
js 0x14026f980
movsxd rax, r9d
lea rcx, [0x1403ac900]
movzx edx, word [rcx + rax*2]
and edx, esi
mov eax, edx
test al, 0x61
je 0x14026f978
test al, 8
jne 0x14026fab8
test rdi, rdi
je 0x14026f6b4
mov r9, rdi
mov r8d, 1
mov edx, 1
lea rcx, [0x1403ac876]
call sub.msvcrt.dll_fwrite
cmp rax, 1
jne 0x14026f7d8
lea rcx, [rsp + 0x4f]
mov r9, rdi
mov r8d, 1
mov edx, 1
call sub.msvcrt.dll_fwrite
cmp rax, 1
jne 0x14026f7d8
mov eax, 2
add r14d, eax
nop dword [rax]
cmp qword [rsp + 0x20], r15
je 0x14026fba8
xor esi, esi
cmp qword [rsp + 0xb0], r15
cmove si, word [rsp + 0x30]
cmp ebp, 2
jne 0x14026f5da
movzx r9d, word [r15]
add r15, 2
rol r9w, 8
movzx r9d, r9w
mov dword [rsp + 0x48], r9d
cmp qword [rsp + 0x20], r15
jne 0x14026f609
mov eax, 0x40
cmp byte [rsp + 0x35], 0
cmovne esi, eax
mov eax, dword [rsp + 0x2c]
test eax, eax
je 0x14026f615
lea rbx, [rsp + 0x4f]
mov r8d, r9d
mov edx, 6
mov rcx, rbx
call fcn.1402736b0
test eax, eax
jle 0x14026f6c0
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 0x14026f83c
nop word cs:[rax + rax]
movzx edx, al
lea r10, [0x1403ac900]
movzx r9d, al
movzx ecx, word [r10 + rdx*2]
and ecx, esi
mov edx, ecx
test cl, 0x61
je 0x14026fa60
and edx, 8
je 0x14026f898
cmp qword [rsp + 0xd0], 0
je 0x14026f7af
mov rax, qword [rsp + 0xd0]
mov byte [rax], 1
test rdi, rdi
je 0x14026f818
lea rcx, [rsp + 0x47]
mov r9, rdi
mov r8d, 1
mov edx, 1
call sub.msvcrt.dll_fwrite
cmp rax, 1
je 0x14026f818
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 0x14026f7d8
mov r9d, dword [r15]
add r15, 4
bswap r9d
mov dword [rsp + 0x48], r9d
jmp 0x14026f5fe
mov eax, 1
add rbx, 1
add r14d, eax
cmp r13, rbx
je 0x14026f6c0
movzx eax, byte [rbx]
mov byte [rsp + 0x47], al
test al, al
jns 0x14026f770
movzx r9d, al
test r12w, r12w
je 0x14026f7af
lea rcx, [rsp + 0x55]
lea r8, [0x1403ac878]
mov edx, 0xb
mov qword [rsp + 0x38], rcx
call fcn.1400b5340
test rdi, rdi
je 0x14026f88c
mov rcx, qword [rsp + 0x38]
mov r9, rdi
mov r8d, 3
mov edx, 1
call sub.msvcrt.dll_fwrite
cmp rax, 3
jne 0x14026f7d8
mov eax, 3
jmp 0x14026f81d
test rdi, rdi
je 0x14026f8e3
mov r9, rdi
mov r8d, 1
mov edx, 1
lea rcx, [0x1403ac876]
call sub.msvcrt.dll_fwrite
cmp rax, 1
jne 0x14026f7d8
lea rcx, [rsp + 0x47]
mov r9, rdi
mov r8d, 1
mov edx, 1
call sub.msvcrt.dll_fwrite
cmp rax, 1
jne 0x14026f7d8
mov eax, 2
jmp 0x14026f81d
mov edx, dword [rsp + 0xb8]
lea r8, [rsp + 0x48]
mov rcx, r15
call fcn.140273500
test eax, eax
js 0x14026f7d8
sub dword [rsp + 0xb8], eax
cdqe
mov r9d, dword [rsp + 0x48]
add r15, rax
jmp 0x14026f5fe
lea r12, [rsp + 0x55]
lea r8, str.W_08lX
mov edx, 0xb
mov rcx, r12
call fcn.1400b5340
test rdi, rdi
je 0x14026f966
mov r9, rdi
mov r8d, 0xa
mov edx, 1
mov rcx, r12
call sub.msvcrt.dll_fwrite
cmp rax, 0xa
jne 0x14026f7d8
mov eax, 0xa
add r14d, eax
jmp 0x14026f6c0
and ax, 0x406
nop dword [rax]
test ax, ax
jne 0x14026fb20
cmp r9d, 0x5c
je 0x14026fae0
test rdi, rdi
je 0x14026f9ba
lea rcx, [rsp + 0x4f]
mov r9, rdi
mov r8d, 1
mov edx, 1
call sub.msvcrt.dll_fwrite
cmp rax, 1
jne 0x14026f7d8
mov eax, 1
jmp 0x14026f96b
lea r12, [rsp + 0x55]
lea r8, str.U_04lX
mov edx, 0xb
mov rcx, r12
call fcn.1400b5340
test rdi, rdi
je 0x14026fa06
mov r9, rdi
mov r8d, 6
mov edx, 1
mov rcx, r12
call sub.msvcrt.dll_fwrite
cmp rax, 6
jne 0x14026f7d8
mov eax, 6
jmp 0x14026f96b
test byte [rsp + 0xb8], 1
je 0x14026f590
call fcn.1401106f0
mov edx, 0xa1
lea r8, [0x1403ac8b0]
lea rcx, str.crypto_asn1_a_strex.c
call fcn.140110820
xor r8d, r8d
mov edx, 0x81
mov ecx, 0xd
call fcn.140110910
mov r12d, 0xffffffff
jmp 0x14026f7de
test cx, 0x406
jne 0x14026f84a
cmp al, 0x5c
jne 0x14026f7af
cmp word [rsp + 0x36], 0
je 0x14026f7af
test rdi, rdi
je 0x14026f8e3
mov r9, rdi
mov r8d, 2
mov edx, 1
lea rcx, [0x1403ac87e]
call sub.msvcrt.dll_fwrite
cmp rax, 2
jne 0x14026f7d8
jmp 0x14026f8e3
cmp qword [rsp + 0xd0], 0
je 0x14026f993
mov rax, qword [rsp + 0xd0]
mov byte [rax], 1
jmp 0x14026f993
test si, 0x40f
je 0x14026f993
test rdi, rdi
je 0x14026f6b4
mov r9, rdi
mov r8d, 2
mov edx, 1
lea rcx, [0x1403ac87e]
call sub.msvcrt.dll_fwrite
cmp rax, 2
jne 0x14026f7d8
jmp 0x14026f6b4
lea r12, [rsp + 0x55]
lea r8, [0x1403ac878]
mov edx, 0xb
mov rcx, r12
call fcn.1400b5340
test rdi, rdi
je 0x14026fb5e
mov r9, rdi
mov r8d, 3
mov edx, 1
mov rcx, r12
call sub.msvcrt.dll_fwrite
cmp rax, 3
jne 0x14026f7d8
mov eax, 3
jmp 0x14026f96b
call fcn.1401106f0
mov edx, 0x9b
lea r8, [0x1403ac8b0]
lea rcx, str.crypto_asn1_a_strex.c
call fcn.140110820
xor r8d, r8d
mov edx, 0x85
mov ecx, 0xd
call fcn.140110910
mov r12d, 0xffffffff
jmp 0x14026f7de
mov r12d, r14d
jmp 0x14026f7de