Function at 0x59cf60
Capabilities:
Encode data using base64

Disassembly:
lea r12, [rsp - 0x20]
cmp r12, qword [r14 + 0x10]
jbe 0x59d4b1
push rbp
mov rbp, rsp
sub rsp, 0x98
mov word [rsp + 0xa8], ax
mov qword [rsp + 0xb0], rbx
mov rdx, qword [rbx + 0x18]
mov rsi, qword [rbx + 0x20]
test rdx, rdx
je 0x59cfaa
mov rdi, qword [0x007cbdd0]
mov r8, qword [rdi]
mov r9d, dword [rdx + 0x10]
jmp 0x59d459
test rdx, rdx
je 0x59d2ce
mov rcx, qword [rdx + 0x18]
mov rax, rsi
call rcx
nop dword [rax]
test rax, rax
je 0x59d2be
mov edx, dword [rax + 0x10]
cmp edx, 0xd7b7e62
jne 0x59d18f
lea rdx, [0x0063df60]
nop
cmp rax, rdx
jne 0x59d2be
movzx edx, word [rsp + 0xa8]
cmp dx, 0x304
jne 0x59d166
mov rax, qword [rbx]
mov qword [rsp + 0x70], rax
mov rbx, qword [rbx + 8]
mov qword [rsp + 0x90], rbx
nop
nop
mov edx, dword [0x0081cd58]
test edx, edx
jne 0x59d03c
lea rax, [0x0081cd58]
lea rbx, [0x0067db30]
call fcn.0047a280
mov rax, qword [rsp + 0x70]
mov rbx, qword [rsp + 0x90]
lea rdx, [0x006c2668]
cmp rax, rdx
jne 0x59d069
mov rcx, qword [0x007ca978]
call fcn.00404f60
test al, al
jne 0x59d145
mov rax, qword [rsp + 0x70]
mov rbx, qword [rsp + 0x90]
nop
nop
mov edx, dword [0x0081cd58]
test edx, edx
jne 0x59d095
lea rax, [0x0081cd58]
lea rbx, [0x0067db30]
call fcn.0047a280
mov rax, qword [rsp + 0x70]
mov rbx, qword [rsp + 0x90]
lea rdx, [0x006c26b0]
nop dword [rax]
cmp rax, rdx
jne 0x59d0c2
mov rcx, qword [0x007ca980]
call fcn.00404f60
test al, al
jne 0x59d132
mov rax, qword [rsp + 0x70]
mov rbx, qword [rsp + 0x90]
nop
nop
mov edx, dword [0x0081cd58]
test edx, edx
jne 0x59d0f2
lea rax, [0x0081cd58]
lea rbx, [0x0067db30]
nop dword [rax]
call fcn.0047a280
mov rax, qword [rsp + 0x70]
mov rbx, qword [rsp + 0x90]
lea rdx, [0x006c26f8]
cmp rax, rdx
jne 0x59d122
mov rcx, qword [0x007ca988]
call fcn.00404f60
test al, al
je 0x59d122
lea rax, [0x006149a0]
call fcn.0040c5a0
mov word [rax], 0x603
nop
jmp 0x59d156
xor eax, eax
xor ebx, ebx
mov rcx, rbx
add rsp, 0x98
pop rbp
ret
lea rax, [0x006149a0]
call fcn.0040c5a0
mov word [rax], 0x503
jmp 0x59d156
lea rax, [0x006149a0]
call fcn.0040c5a0
mov word [rax], 0x403
mov ecx, 1
mov r9d, 1
jmp 0x59d375
lea rax, [0x00614be0]
call fcn.0040c5a0
movabs rcx, 0x203060305030403
mov qword [rax], rcx
mov ecx, 4
mov r9d, 4
jmp 0x59d375
cmp edx, 0x1f1dc2ee
jne 0x59d1ca
lea rdx, [0x0061b820]
nop
cmp rax, rdx
jne 0x59d2be
lea rax, [0x006149a0]
call fcn.0040c5a0
mov word [rax], 0x807
mov ecx, 1
mov r9d, 1
jmp 0x59d375
cmp edx, 0xa5b10491
jne 0x59d2be
lea rdx, [0x00621e40]
nop dword [rax]
cmp rax, rdx
jne 0x59d2be
mov rdx, qword [rbx]
mov rsi, qword [rdx + 0x10]
lea rdi, [rsi - 1]
nop
test rdi, rdi
jl 0x59d25b
mov rdx, qword [rdx + 8]
mov rdx, qword [rdx + rsi*8 - 8]
mov rsi, rdx
shr rdx, 1
or rdx, rsi
mov rsi, rdx
shr rdx, 2
or rdx, rsi
mov rsi, rdx
shr rdx, 4
or rdx, rsi
mov rsi, rdx
shr rdx, 8
or rdx, rsi
mov rsi, rdx
shr rdx, 0x10
or rdx, rsi
mov rsi, rdx
shr rdx, 0x20
or rdx, rsi
shl rdi, 6
bsr rdx, rdx
mov rsi, 0xffffffffffffffff
cmove rdx, rsi
lea rdx, [rdx + rdi]
lea rdx, [rdx + 1]
jmp 0x59d25d
xor edx, edx
mov qword [rsp + 0x48], rdx
mov rcx, qword [0x007cbc18]
mov qword [rsp + 0x60], rcx
lea rax, [0x00618660]
xor ebx, ebx
call fcn.0045fec0
mov rdx, qword [0x007cbc10]
mov rsi, qword [rsp + 0x48]
lea rdi, [rsi + 7]
sar rdi, 0x3f
shr rdi, 0x3d
lea rsi, [rdi + rsi]
lea rsi, [rsi + 7]
mov rdi, qword [0x007cbc18]
sar rsi, 3
mov qword [rsp + 0x50], rsi
movzx r8d, word [rsp + 0xa8]
mov r9, qword [rsp + 0x60]
xor ecx, ecx
jmp 0x59d2e8
xor eax, eax
xor ebx, ebx
mov rcx, rbx
add rsp, 0x98
pop rbp
ret
xor eax, eax
xor ebx, ebx
mov rcx, rbx
add rsp, 0x98
pop rbp
ret
add rdx, 0x18
dec rdi
mov rcx, rbx
test rdi, rdi
jle 0x59d375
movzx r10d, word [rdx]
cmp qword [rdx + 8], rsi
jg 0x59d36d
movzx r11d, word [rdx + 0x10]
cmp r8w, r11w
ja 0x59d365
lea rbx, [rcx + 1]
cmp r9, rbx
jae 0x59d35a
mov qword [rsp + 0x68], rdi
mov qword [rsp + 0x88], rdx
mov word [rsp + 0x46], r10w
mov rcx, r9
mov edi, 1
lea rsi, [0x00618660]
call fcn.0045ffa0
mov rdx, qword [rsp + 0x88]
mov rsi, qword [rsp + 0x50]
mov rdi, qword [rsp + 0x68]
movzx r8d, word [rsp + 0xa8]
movzx r10d, word [rsp + 0x46]
mov r9, rcx
mov word [rax + rbx*2 - 2], r10w
jmp 0x59d2de
mov rbx, rcx
jmp 0x59d2de
mov rbx, rcx
jmp 0x59d2de
mov rdx, qword [rsp + 0xb0]
cmp qword [rdx + 0x28], 0
je 0x59d39c
mov qword [rsp + 0x80], rax
mov qword [rsp + 0x58], rcx
xor ebx, ebx
xor esi, esi
xor edi, edi
xor r8d, r8d
jmp 0x59d3ae
mov rbx, rcx
mov rcx, r9
add rsp, 0x98
pop rbp
ret
inc rbx
cmp rcx, rbx
jle 0x59d423
movzx r9d, word [rax + rbx*2]
mov r10, qword [rdx + 0x28]
mov r11, qword [rdx + 0x30]
xor r12d, r12d
jmp 0x59d440
inc r8
cmp rsi, r8
jae 0x59d41b
mov qword [rsp + 0x68], rbx
mov word [rsp + 0x44], r9w
mov rax, rdi
mov rbx, r8
mov rcx, rsi
mov edi, 1
lea rsi, [0x00618660]
call fcn.0045ffa0
mov rdx, qword [rsp + 0xb0]
movzx r9d, word [rsp + 0x44]
mov r8, rbx
mov rdi, rax
mov rsi, rcx
mov rax, qword [rsp + 0x80]
mov rcx, qword [rsp + 0x58]
mov rbx, qword [rsp + 0x68]
mov word [rdi + r8*2 - 2], r9w
jmp 0x59d3ab
mov rax, rdi
mov rbx, r8
mov rcx, rsi
add rsp, 0x98
pop rbp
ret
inc r12
nop dword [rax + rax]
cmp r12, r11
jge 0x59d3ab
movzx r13d, word [r10 + r12*2]
cmp r13w, r9w
jne 0x59d435
jmp 0x59d3c5
mov r10, r9
and r9, r8
shl r9, 4
mov r11, qword [r9 + rdi + 8]
cmp rdx, r11
je 0x59d4a7
lea r9, [r10 + 1]
test r11, r11
jne 0x59d459
mov qword [rsp + 0x78], rsi
lea rax, [0x007cbdd0]
mov rbx, rdx
call fcn.0040a480
mov rbx, qword [rsp + 0xb0]
mov rsi, qword [rsp + 0x78]
mov rdx, rax
movzx eax, word [rsp + 0xa8]
jmp 0x59cfaa
mov rdx, qword [r9 + rdi + 0x10]
jmp 0x59cfaa
mov word [rsp + 8], ax
mov qword [rsp + 0x10], rbx
nop dword [rax + rax]
call fcn.00463fe0
movzx eax, word [rsp + 8]
mov rbx, qword [rsp + 0x10]
jmp fcn.0059cf60