Function at 0x10040f470
Capabilities:
Encode data using base64

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x38
mov r15, qword [0x1004294e0]
mov edi, dword [rsp + 0xa0]
mov rax, qword [r15]
mov qword [rsp + 0x28], rax
xor eax, eax
mov rbx, rcx
mov r12, rdx
test rdx, rdx
je 0x10040f659
lea esi, [rdi + 1]
xor r10d, r10d
lea r14, [rsp + 0x24]
lea rbp, [rsp + 0x28]
movsxd rsi, esi
lea r13, [0x10041e980]
nop dword [rax]
movzx eax, byte [rbx]
mov ecx, eax
shl eax, 4
shr cl, 2
and eax, 0x30
cmp r12, 2
jbe 0x10040f5d0
mov byte [rsp + 0x24], cl
movzx edx, byte [rbx + 2]
sub r12, 3
add rbx, 3
movzx r11d, byte [rbx - 2]
mov ecx, r11d
shr cl, 4
add eax, ecx
mov ecx, edx
and edx, 0x3f
mov byte [rsp + 0x25], al
lea eax, [r11*4]
shr cl, 6
and eax, 0x3c
mov byte [rsp + 0x27], dl
add eax, ecx
mov byte [rsp + 0x26], al
mov r11, r14
mov rcx, r10
test edi, edi
je 0x10040f547
mov rax, r10
xor edx, edx
div rsi
test rdx, rdx
jne 0x10040f547
lea rcx, [r10 + 1]
cmp rcx, r9
jae 0x10040f665
mov byte [r8 + r10], 0xa
movzx eax, byte [r11]
lea edx, [rax - 0x40]
cmp dl, 0xbe
jbe 0x10040f61b
lea r10, [rcx + 1]
cmp r10, r9
jae 0x10040f63a
add rcx, r8
cmp al, 0xff
je 0x10040f588
movzx eax, byte [r13 + rax]
add r11, 1
mov byte [rcx], al
cmp rbp, r11
je 0x10040f594
mov rcx, r10
test edi, edi
je 0x10040f547
jmp 0x10040f528
add r11, 1
mov byte [rcx], 0x3d
cmp rbp, r11
jne 0x10040f57c
test r12, r12
jne 0x10040f4c8
add r8, r10
mov eax, r10d
mov byte [r8], 0
mov rsi, qword [rsp + 0x28]
xor rsi, qword [r15]
jne 0x10040f684
add rsp, 0x38
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
jne 0x10040f608
movzx edx, byte [rbx + 1]
mov byte [rsp + 0x24], cl
add rbx, 2
mov ecx, edx
shr cl, 4
add eax, ecx
mov byte [rsp + 0x25], al
lea eax, [rdx*4]
and eax, 0x3c
mov byte [rsp + 0x26], al
xor r12d, r12d
mov byte [rsp + 0x27], 0xff
jmp 0x10040f51e
mov byte [rsp + 0x25], al
add rbx, 1
mov eax, 0xffffffff
mov byte [rsp + 0x24], cl
jmp 0x10040f5f3
lea r9, [0x10041e920]
lea r8, [0x10041e958]
mov edx, 0xf3
lea rcx, [0x10041e8c8]
call fcn.100414bc0
lea r9, [0x10041e8b1]
lea r8, [0x10041e958]
mov edx, 0xf4
lea rcx, [0x10041e8c8]
call fcn.100414bc0
test r9, r9
je 0x10040f689
xor eax, eax
jmp 0x10040f5a3
lea r9, [0x10041e8b1]
lea r8, [0x10041e958]
mov edx, 0xef
lea rcx, [0x10041e8c8]
call fcn.100414bc0
call fcn.100414c30
lea r9, [0x10041e943]
lea r8, [0x10041e958]
mov edx, 0xfd
lea rcx, [0x10041e8c8]
call fcn.100414bc0
nop
nop
nop
nop
nop
nop
nop
nop
sub rsp, 0x28
test rcx, rcx
je 0x10040f727
test rdx, rdx
je 0x10040f708
test r8, r8
je 0x10040f6e9
cmp rdx, 1
jbe 0x10040f6e0
movzx eax, word [rcx]
rol ax, 8
movzx eax, ax
mov dword [r8], eax
mov eax, 2
add rsp, 0x28
ret
mov rax, 0xffffffffffffffff
jmp 0x10040f6db
lea r9, [0x10041ea4a]
lea r8, [0x10041eb10]
mov edx, 0xeb
lea rcx, str.DllImportAttribute
call fcn.100414bc0
lea r9, [0x10041ea41]
lea r8, [0x10041eb10]
mov edx, 0xea
lea rcx, str.DllImportAttribute
call fcn.100414bc0
lea r9, [0x10041e9e0]
lea r8, [0x10041eb10]
mov edx, 0xe9
lea rcx, str.DllImportAttribute
call fcn.100414bc0
nop
nop word [rax + rax]
sub rsp, 0x28
test rcx, rcx
je 0x10040f7c7
test rdx, rdx
je 0x10040f7a8
test r8, r8
je 0x10040f789
cmp rdx, 3
jbe 0x10040f780
mov eax, dword [rcx]
bswap eax
mov dword [r8], eax
mov eax, 4
add rsp, 0x28
ret
mov rax, 0xffffffffffffffff
jmp 0x10040f775
lea r9, [0x10041ea55]
lea r8, [0x10041eac0]
mov edx, 0xfb
lea rcx, str.DllImportAttribute
call fcn.100414bc0
lea r9, [0x10041ea41]
lea r8, [0x10041eac0]
mov edx, 0xfa
lea rcx, str.DllImportAttribute
call fcn.100414bc0
lea r9, [0x10041e9e0]
lea r8, [0x10041eac0]
mov edx, 0xf9
lea rcx, str.DllImportAttribute
call fcn.100414bc0
nop
nop word [rax + rax]