Function at 0x5f98e0
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push rbp
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbx
sub rsp, 0x38
lea rbp, [rsp + 0x30]
mov ebx, edx
mov rdi, rcx
mov eax, 0xfffffffe
test rdi, rdi
je 0x5fa405
cmp qword [rdi + 0x30], 0
je 0x5fa405
cmp qword [rdi + 0x38], 0
je 0x5fa405
mov r13, qword [rdi + 0x28]
test r13, r13
je 0x5fa405
cmp qword [r13], rdi
jne 0x5fa405
mov ecx, dword [r13 + 8]
lea edx, [rcx - 0x39]
cmp edx, 0x38
ja 0x5f998b
movabs rsi, 0x100400400011001
bt rsi, rdx
jae 0x5f998b
cmp ebx, 5
ja 0x5fa405
cmp qword [rdi + 0x10], 0
je 0x5f997b
mov edx, dword [rdi + 8]
test edx, edx
je 0x5f996e
cmp qword [rdi], 0
je 0x5f997b
cmp ebx, 4
je 0x5f999d
cmp ecx, 0x29a
jne 0x5f999d
mov rcx, qword [str.stream_error]
mov qword [rdi + 0x20], rcx
jmp 0x5fa405
cmp ecx, 0x29a
je 0x5f9951
cmp ecx, 0x2a
je 0x5f9951
jmp 0x5fa405
cmp dword [rdi + 0x18], 0
je 0x5f9dd8
mov eax, dword [r13 + 0x40]
mov dword [r13 + 0x40], ebx
cmp dword [r13 + 0x28], 0
je 0x5f9ba5
mov rcx, r13
call fcn.00601250
mov r8d, dword [r13 + 0x28]
mov ecx, dword [rdi + 0x18]
cmp r8d, ecx
mov r15d, r8d
cmova r15d, ecx
test r15d, r15d
je 0x5f9a18
mov rcx, qword [rdi + 0x10]
mov rdx, qword [r13 + 0x20]
mov r14d, r15d
mov r8, r14
call sub.msvcrt.dll_memcpy
add qword [rdi + 0x10], r14
add qword [r13 + 0x20], r14
add dword [rdi + 0x1c], r15d
mov ecx, dword [rdi + 0x18]
sub ecx, r15d
mov dword [rdi + 0x18], ecx
mov r8d, dword [r13 + 0x28]
sub r8d, r15d
mov dword [r13 + 0x28], r8d
jne 0x5f9a18
mov rax, qword [r13 + 0x10]
mov qword [r13 + 0x20], rax
xor r8d, r8d
test ecx, ecx
je 0x5fa3fb
mov ecx, dword [r13 + 8]
cmp ecx, 0x2a
jne 0x5f9bb9
mov ecx, dword [r13 + 0x48]
shl ecx, 0xc
add ecx, 0xffff8800
xor edx, edx
cmp dword [r13 + 0xb0], 1
jg 0x5f9a69
mov eax, dword [r13 + 0xac]
cmp eax, 2
jl 0x5f9a69
mov edx, 0x40
cmp eax, 6
jl 0x5f9a69
mov eax, 0x80
mov edx, 0xc0
cmove edx, eax
or edx, ecx
mov ecx, edx
or ecx, 0x20
cmp dword [r13 + 0x94], 0
cmove ecx, edx
imul rax, rcx, 0x8421085
shr rax, 0x20
mov edx, ecx
sub edx, eax
shr edx, 1
add edx, eax
shr edx, 4
mov eax, edx
shl eax, 5
sub eax, edx
mov edx, ecx
sub edx, eax
or edx, ecx
mov rax, qword [r13 + 0x10]
lea esi, [r8 + 1]
mov dword [r13 + 0x28], esi
mov esi, r8d
mov byte [rax + rsi], ch
xor dl, 0x1f
mov rax, qword [r13 + 0x10]
mov ecx, dword [r13 + 0x28]
lea esi, [rcx + 1]
mov dword [r13 + 0x28], esi
mov byte [rax + rcx], dl
cmp dword [r13 + 0x94], 0
je 0x5f9b26
mov eax, dword [rdi + 0x4c]
mov ecx, eax
shr ecx, 0x10
shr eax, 0x18
mov r8, qword [r13 + 0x10]
mov esi, dword [r13 + 0x28]
lea edx, [rsi + 1]
mov dword [r13 + 0x28], edx
mov byte [r8 + rsi], al
mov rax, qword [r13 + 0x10]
mov edx, dword [r13 + 0x28]
lea esi, [rdx + 1]
mov dword [r13 + 0x28], esi
mov byte [rax + rdx], cl
mov eax, dword [rdi + 0x4c]
mov rcx, qword [r13 + 0x10]
mov edx, dword [r13 + 0x28]
lea esi, [rdx + 1]
mov dword [r13 + 0x28], esi
mov byte [rcx + rdx], ah
mov rcx, qword [r13 + 0x10]
mov edx, dword [r13 + 0x28]
lea esi, [rdx + 1]
mov dword [r13 + 0x28], esi
mov byte [rcx + rdx], al
xor ecx, ecx
xor edx, edx
xor r8d, r8d
call fcn.00603700
mov dword [rdi + 0x4c], eax
mov dword [r13 + 8], 0x71
mov r14, qword [rdi + 0x28]
mov rcx, r14
call fcn.00601250
mov r12d, dword [r14 + 0x28]
mov eax, dword [rdi + 0x18]
cmp r12d, eax
cmova r12d, eax
test r12d, r12d
je 0x5f9b94
mov rcx, qword [rdi + 0x10]
xor r8d, r8d
test edx, edx
je 0x5f9d9e
cmp ecx, 0x2a
je 0x5f9a2d
cmp ecx, 0x29a
jne 0x5f9bd0
cmp dword [rdi + 8], 0
jne 0x5f9dd8
jmp 0x5fa41c
xor esi, esi
cmp ebx, 4
setg r10b
xor r11d, r11d
cmp eax, 4
setg r9b
cmp ebx, 4
je 0x5f9bb0
lea edx, [rbx + rbx]
mov sil, r10b
lea esi, [rsi + rsi*8]
sub edx, esi
add eax, eax
mov r11b, r9b
lea esi, [r11 + r11*8]
sub eax, esi
cmp edx, eax
jg 0x5f9bb0
mov rax, qword [str.buffer_error]
mov qword [rdi + 0x20], rax
mov eax, 0xfffffffb
jmp 0x5fa405