Function at 0x5e1f30
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 rbp, qword [rsp + 0xf8]
mov r15d, r8d
movsxd rax, edx
mov r13, rcx
mov dword [rsp + 0xd8], edx
and r15d, 7
mov word [rsp + 0x5a], r9w
lea r12, [rcx + rax]
cmp r15d, 2
je 0x5e2480
cmp r15d, 4
jne 0x5e1f82
and edx, 3
jne 0x5e2559
xor esi, esi
cmp r13, r12
je 0x5e2108
mov eax, r9d
and r8d, 8
xor esi, esi
mov qword [rsp + 0x30], r12
and eax, 1
mov dword [rsp + 0x3c], r8d
mov word [rsp + 0x58], ax
lea rax, [rsp + 0x68]
mov qword [rsp + 0x48], rax
mov eax, esi
mov rsi, r13
mov r14d, eax
movzx edi, word [rsp + 0x58]
mov eax, 0
shl edi, 5
cmp r13, rsi
cmovne edi, eax
cmp r15d, 1
je 0x5e2340
jle 0x5e2120
cmp r15d, 2
je 0x5e2352
cmp r15d, 4
jne 0x5e2103
mov r9d, dword [rsi]
add rsi, 4
bswap r9d
mov dword [rsp + 0x68], r9d
cmp qword [rsp + 0x30], rsi
je 0x5e2159
mov eax, dword [rsp + 0x3c]
test eax, eax
jne 0x5e2173
cmp r9d, 0xffff
ja 0x5e2370
cmp r9d, 0xff
ja 0x5e2430
or di, word [rsp + 0x5a]
mov byte [rsp + 0x6f], r9b
mov eax, edi
and eax, 4
test r9b, r9b
js 0x5e23d4
movsxd rax, r9d
lea rdx, [0x008da1c0]
movzx ecx, word [rdx + rax*2]
and ecx, edi
mov eax, ecx
test al, 0x61
je 0x5e23d0
test al, 8
jne 0x5e20c2
test rbp, rbp
je 0x5e20aa
mov r9, rbp
mov r8d, 1
mov edx, 1
lea rcx, [0x008da136]
call sub.msvcrt.dll_fwrite
cmp rax, 1
jne 0x5e2103
lea rcx, [rsp + 0x6f]
mov r9, rbp
mov r8d, 1
mov edx, 1
call sub.msvcrt.dll_fwrite
cmp rax, 1
jne 0x5e2103
mov eax, 2
add r14d, eax
cmp qword [rsp + 0x30], rsi
jne 0x5e1fba
mov esi, r14d
jmp 0x5e2108
cmp qword [rsp + 0xf0], 0
je 0x5e20d8
mov rax, qword [rsp + 0xf0]
mov byte [rax], 1
test rbp, rbp
je 0x5e2424
lea rcx, [rsp + 0x6f]
mov r9, rbp
mov r8d, 1
mov edx, 1
call sub.msvcrt.dll_fwrite
cmp rax, 1
je 0x5e2424
mov esi, 0xffffffff
mov eax, esi
add rsp, 0x88
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
test r15d, r15d
jne 0x5e2103
mov r8, qword [rsp + 0x48]
mov edx, dword [rsp + 0xd8]
mov rcx, rsi
call fcn.005e9190
test eax, eax
js 0x5e2103
sub dword [rsp + 0xd8], eax
cdqe
mov r9d, dword [rsp + 0x68]
add rsi, rax
cmp qword [rsp + 0x30], rsi
jne 0x5e200b
mov eax, 0x40
cmp word [rsp + 0x58], 0
cmovne edi, eax
mov eax, dword [rsp + 0x3c]
test eax, eax
je 0x5e2017
lea rbx, [rsp + 0x6f]
mov r8d, r9d
mov edx, 6
mov rcx, rbx
call fcn.005e94a0
test eax, eax
jle 0x5e20b2
or di, word [rsp + 0x5a]
sub eax, 1
mov qword [rsp + 0xf8], rbp
mov ebp, r14d
mov ecx, edi
mov edx, edi
lea r12, [rbx + rax + 1]
mov r14, r13
lea rax, [rsp + 0x67]
and cx, 0x40f
and edx, 4
mov r13, rsi
mov qword [rsp + 0x40], rax
lea rax, [rsp + 0x75]
mov rsi, qword [rsp + 0xf8]
mov word [rsp + 0x5e], cx
mov word [rsp + 0x5c], dx
mov qword [rsp + 0x50], rax
movzx eax, byte [rbx]
mov byte [rsp + 0x67], al
test al, al
js 0x5e2291
movzx edx, al
lea r10, [0x008da1c0]
movzx ecx, word [r10 + rdx*2]
mov r9, rdx
and ecx, edi
mov edx, ecx
test cl, 0x61
je 0x5e24c0
and edx, 8
je 0x5e22e4
cmp qword [rsp + 0xf0], 0
je 0x5e222d
mov rax, qword [rsp + 0xf0]
mov byte [rax], 1
test rsi, rsi
je 0x5e2254
mov rcx, qword [rsp + 0x40]
mov r9, rsi
mov r8d, 1
mov edx, 1
call sub.msvcrt.dll_fwrite
cmp rax, 1
jne 0x5e2103
mov eax, 1
add rbx, 1
add ebp, eax
cmp r12, rbx
jne 0x5e21e0
mov qword [rsp + 0xf8], rsi
mov rsi, r13
mov r13, r14
mov r14d, ebp
mov rbp, qword [rsp + 0xf8]
cmp qword [rsp + 0x30], rsi
jne 0x5e1fba
jmp 0x5e20bd
cmp word [rsp + 0x5c], 0
movzx r9d, al
je 0x5e222d
mov rcx, qword [rsp + 0x50]
lea r8, [0x008da138]
mov edx, 0xb
call fcn.004f3710
test rsi, rsi
je 0x5e22da
mov rcx, qword [rsp + 0x50]
mov r9, rsi
mov r8d, 3
mov edx, 1
call sub.msvcrt.dll_fwrite
cmp rax, 3
jne 0x5e2103
mov eax, 3
jmp 0x5e2259
test rsi, rsi
je 0x5e232f
mov r9, rsi
mov r8d, 1
mov edx, 1
lea rcx, [0x008da136]
call sub.msvcrt.dll_fwrite
cmp rax, 1
jne 0x5e2103
mov rcx, qword [rsp + 0x40]
mov r9, rsi
mov r8d, 1
mov edx, 1
call sub.msvcrt.dll_fwrite
cmp rax, 1
jne 0x5e2103
mov eax, 2
jmp 0x5e2259
movzx r9d, byte [rsi]
add rsi, 1
mov dword [rsp + 0x68], r9d
jmp 0x5e2000
movzx r9d, word [rsi]
add rsi, 2
rol r9w, 8
movzx r9d, r9w
mov dword [rsp + 0x68], r9d
jmp 0x5e2000
lea rbx, [rsp + 0x75]
lea r8, str.W_08lX
mov edx, 0xb
mov rcx, rbx
call fcn.004f3710
test rbp, rbp
je 0x5e23ae
mov r9, rbp
mov r8d, 0xa
mov edx, 1
mov rcx, rbx
call sub.msvcrt.dll_fwrite
cmp rax, 0xa
jne 0x5e2103
mov eax, 0xa
add r14d, eax
cmp qword [rsp + 0x30], rsi
jne 0x5e1fba
jmp 0x5e20bd
and ax, 0x406
test ax, ax
jne 0x5e2511
cmp r9d, 0x5c
jne 0x5e20d8
test di, 0x40f
je 0x5e20d8
test rbp, rbp
je 0x5e20aa
mov r9, rbp
mov r8d, 2
mov edx, 1
lea rcx, [0x008da13e]
call sub.msvcrt.dll_fwrite
cmp rax, 2
jne 0x5e2103
jmp 0x5e20aa
mov eax, 1
jmp 0x5e23b3
lea rbx, [rsp + 0x75]
lea r8, str.U_04lX
mov edx, 0xb
mov rcx, rbx
call fcn.004f3710
test rbp, rbp
je 0x5e246e
mov r9, rbp
mov r8d, 6
mov edx, 1
mov rcx, rbx
call sub.msvcrt.dll_fwrite
cmp rax, 6
jne 0x5e2103
mov eax, 6
jmp 0x5e23b3
test byte [rsp + 0xd8], 1
je 0x5e1f82
mov r8d, 0x81
mov edx, 0x8e
mov ecx, 0xd
mov dword [rsp + 0x20], 0xa1
lea r9, str.crypto_asn1_a_strex.c
mov esi, 0xffffffff
call fcn.005292e0
jmp 0x5e2108
test cx, 0x406
jne 0x5e229d
cmp al, 0x5c
jne 0x5e222d
cmp word [rsp + 0x5e], 0
je 0x5e222d
test rsi, rsi
je 0x5e232f
mov r9, rsi
mov r8d, 2
mov edx, 1
lea rcx, [0x008da13e]
call sub.msvcrt.dll_fwrite
cmp rax, 2
jne 0x5e2103
jmp 0x5e232f
lea rbx, [rsp + 0x75]
lea r8, [0x008da138]
mov edx, 0xb
mov rcx, rbx
call fcn.004f3710
test rbp, rbp
je 0x5e254f
mov r9, rbp
mov r8d, 3
mov edx, 1
mov rcx, rbx
call sub.msvcrt.dll_fwrite
cmp rax, 3
jne 0x5e2103
mov eax, 3
jmp 0x5e23b3
mov r8d, 0x85
mov edx, 0x8e
mov ecx, 0xd
mov dword [rsp + 0x20], 0x9b
lea r9, str.crypto_asn1_a_strex.c
mov esi, 0xffffffff
call fcn.005292e0
jmp 0x5e2108