Function at 0x477440
Capabilities:
Encode data using base64

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x618
mov r13, qword [rdx]
test r13, r13
je 0x477b95
mov rdi, r8
mov r8, qword [rdx + 8]
test r8, r8
je 0x477b95
mov rax, qword [rdx + 0x10]
test rax, rax
je 0x477b95
mov r9, r13
add r9, rax
jb 0x477b95
mov qword [rsp + 0x68], rcx
mov rsi, r13
sub rsi, r8
jb 0x477b95
mov qword [rsp + 0x98], r8
mov qword [rsp + 0xa0], rax
mov rax, r9
shr rax, 0x3d
jne 0x477b95
mov qword [rsp + 0x90], rdx
movzx eax, word [rdx + 0x18]
mov word [rsp + 0x66], ax
movzx r15d, ax
movsx rax, r15w
mov qword [rsp + 0xb8], rax
mov qword [rsp + 0x88], r9
mov rcx, r9
mov edx, r15d
call fcn.004771f2
mov rbx, rax
mov r12d, edx
mov rcx, rsi
mov edx, r15d
mov r8d, r12d
call fcn.00474b91
mov qword [rsp + 0x58], rax
mov r14d, edx
mov qword [rsp + 0xb0], r13
mov rcx, r13
mov qword [rsp + 0x70], r15
mov edx, r15d
mov r8d, r12d
call fcn.00474b91
mov r15, rax
mov ebp, edx
mov edx, 0xffffffa0
sub edx, r12d
lea r13, [rsp + 0x378]
mov rcx, r13
call fcn.004771ab
movzx eax, word [r13]
mov word [rsp + 0x56], ax
mov rsi, qword [r13 + 8]
movzx r13d, word [r13 + 0x10]
mov rcx, rbx
mov edx, r12d
mov r8, rsi
mov r9d, r13d
call fcn.00477290
mov r12, rax
mov ebx, edx
mov rcx, qword [rsp + 0x58]
mov edx, r14d
mov r8, rsi
mov r9d, r13d
call fcn.00477290
mov qword [rsp + 0x58], rax
mov rcx, r15
mov edx, ebp
mov r8, rsi
mov r9d, r13d
call fcn.00477290
mov qword [rsp + 0x78], rax
lea rax, [r12 + 1]
neg ebx
and ebx, 0x3f
mov rsi, rax
mov ecx, ebx
shr rsi, cl
mov edx, 1
shl rdx, cl
mov r15d, 1
mov qword [rsp + 0xa8], rdx
lea r14, [rdx - 1]
mov rbp, r14
mov qword [rsp + 0x80], rax
and rbp, rax
mov ecx, esi
call fcn.004772e3
mov r8d, edx
movzx r11d, al
mov r9d, r11d
sub r9w, word [rsp + 0x56]
inc r9d
sub r12, qword [rsp + 0x58]
add r12, 2
mov r10, r14
and r10, r12
neg r11
mov r13d, 0xa
test r8d, r8d
je 0x477b95
mov eax, esi
xor edx, edx
div r8d
cmp r15, 0x12
je 0x477b95
mov esi, edx
mov edx, edx
mov ecx, ebx
shl rdx, cl
add al, 0x30
mov byte [rdi + r15 - 1], al
add rdx, rbp
cmp rdx, r12
jb 0x47764c
lea rax, [r11 + r15]
cmp rax, 1
je 0x477680
mov eax, r8d
xor edx, edx
div r13d
inc r15
mov r8d, eax
jmp 0x477600
mov eax, r8d
mov ecx, ebx
shl rax, cl
mov rcx, qword [rsp + 0x80]
sub rcx, qword [rsp + 0x78]
mov qword [rsp + 0x30], rcx
mov qword [rsp + 0x28], r12
mov qword [rsp + 0x20], rdx
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x40], 1
jmp 0x4776e7
mov eax, 1
cmp r15, 0x11
je 0x477b95
imul rdx, rbp, 0xa
mov rbp, rdx
and rbp, r14
imul rax, rax, 0xa
imul r10, r10, 0xa
mov ecx, ebx
shr rdx, cl
add dl, 0x30
mov byte [rdi + r15], dl
inc r15
cmp rbp, r10
jae 0x477685
mov rcx, qword [rsp + 0x80]
sub rcx, qword [rsp + 0x78]
imul rcx, rax
mov qword [rsp + 0x40], rax
mov rax, qword [rsp + 0xa8]
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x28], r10
mov qword [rsp + 0x20], rbp
mov qword [rsp + 0x30], rcx
lea rcx, [rsp + 0xc0]
mov rdx, rdi
mov r8, r15
call fcn.0047736e
cmp qword [rsp + 0xc0], 0
mov r14, qword [rsp + 0xb8]
mov rdx, qword [rsp + 0xb0]
je 0x477736
mov rax, qword [rsp + 0xd0]
mov rcx, qword [rsp + 0x68]
mov qword [rcx + 0x10], rax
movups xmm0, xmmword [rsp + 0xc0]
movups xmmword [rcx], xmm0
jmp 0x477b62
mov rax, qword [rsp + 0x88]
dec rax
je 0x47774d
bsr rax, rax
xor rax, 0x3f
jmp 0x477752
mov eax, 0x40
mov rcx, qword [rsp + 0x90]
mov cl, byte [rcx + 0x1a]
mov byte [rsp + 0x56], cl
mov rcx, r14
sub rcx, rax
imul rax, rcx, 0x4d104d42
movabs rbx, 0x1344135080
add rbx, rax
shr rbx, 0x20
lea rcx, [rsp + 0xd8]
call fcn.004768a1
lea rcx, [rsp + 0x180]
mov rdx, qword [rsp + 0x98]
call fcn.004768a1
lea rcx, [rsp + 0x228]
mov rdx, qword [rsp + 0xa0]
call fcn.004768a1
lea rsi, [rsp + 0x2d4]
mov r8d, 0x9c
mov rcx, rsi
xor edx, edx
call sub.ntdll.dll_memset
mov qword [rsi + 0x9c], 1
mov dword [rsi - 4], 1
cmp word [rsp + 0x66], 0
js 0x477817
lea rcx, [rsp + 0xd8]
mov rdx, qword [rsp + 0x70]
call fcn.00476a24
lea rcx, [rsp + 0x180]
mov rdx, r14
call fcn.00476a24
lea rcx, [rsp + 0x228]
mov rdx, r14
jmp 0x47782a
mov rax, qword [rsp + 0x70]
neg eax
movsx rdx, ax
lea rcx, [rsp + 0x2d0]
call fcn.00476a24
test bx, bx
js 0x477841
movzx edx, bx
lea rcx, [rsp + 0x2d0]
jmp 0x477873
mov eax, ebx
neg eax
movzx esi, ax
lea rcx, [rsp + 0xd8]
mov rdx, rsi
call fcn.0047706b
lea rcx, [rsp + 0x180]
mov rdx, rsi
call fcn.0047706b
lea rcx, [rsp + 0x228]
mov rdx, rsi
call fcn.0047706b
lea rdx, [rsp + 0xd8]
mov rax, qword [rdx + 0xa0]
lea rsi, [rsp + 0x378]
mov qword [rsi + 0xa0], rax
mov r8d, 0xa0
mov rcx, rsi
call sub.ntdll.dll_memcpy
lea rdx, [rsp + 0x228]
mov rcx, rsi
call fcn.00476906
lea rcx, [rsp + 0x2d0]
mov rdx, rsi
call fcn.00476cc5
cmp al, byte [rsp + 0x56]
jge 0x4778d3
inc ebx
mov qword [rsp + 0x58], rbx
jmp 0x47790e
mov qword [rsp + 0x58], rbx
lea rcx, [rsp + 0xd8]
mov edx, 0xa
call fcn.004769c5
lea rcx, [rsp + 0x180]
mov edx, 0xa
call fcn.004769c5
lea rcx, [rsp + 0x228]
mov edx, 0xa
call fcn.004769c5
lea r15, [rsp + 0x2d0]
mov rax, qword [r15 + 0xa0]
lea rsi, [rsp + 0x420]
mov qword [rsi + 0xa0], rax
mov r8d, 0xa0
mov rcx, rsi
mov rdx, r15
call sub.ntdll.dll_memcpy
mov edx, 1
mov rcx, rsi
call fcn.00476a24
mov rax, qword [r15 + 0xa0]
lea rsi, [rsp + 0x4c8]
mov qword [rsi + 0xa0], rax
mov r8d, 0xa0
mov rcx, rsi
mov rdx, r15
call sub.ntdll.dll_memcpy
mov edx, 2
mov rcx, rsi
call fcn.00476a24
mov rax, qword [r15 + 0xa0]
lea r14, [rsp + 0x570]
mov qword [r14 + 0xa0], rax
mov r8d, 0xa0
mov rcx, r14
mov rdx, r15
call sub.ntdll.dll_memcpy
mov edx, 3
mov rcx, r14
call fcn.00476a24
xor esi, esi
lea r12, [rsp + 0xd8]
lea rbp, [rsp + 0x378]
lea rbx, [rsp + 0x228]
mov rcx, r12
mov rdx, r14
call fcn.00477135
test al, al
je 0x4779eb
mov rcx, r12
mov rdx, r14
call fcn.0047696c
mov r14b, 8
jmp 0x4779ee
xor r14d, r14d
mov r13, rdi
mov rcx, r12
lea rdi, [rsp + 0x4c8]
mov rdx, rdi
call fcn.00477135
test al, al
je 0x477a17
mov rcx, r12
mov rdx, rdi
call fcn.0047696c
or r14b, 4
lea rdi, [rsp + 0x420]
mov rcx, r12
mov rdx, rdi
call fcn.00477135
test al, al
je 0x477a3d
mov rcx, r12
mov rdx, rdi
call fcn.0047696c
add r14b, 2
mov rdi, r13
mov rcx, r12
mov rdx, r15
call fcn.00477135
test al, al
je 0x477a5d
mov rcx, r12
mov rdx, r15
call fcn.0047696c
inc r14b
cmp rsi, 0x11
je 0x477b95
add r14b, 0x30
mov byte [rdi + rsi], r14b
mov rcx, r12
lea rdx, [rsp + 0x180]
call fcn.00476cc5
mov r14d, eax
mov rax, qword [rsp + 0x178]
mov qword [rsp + 0x418], rax
mov r8d, 0xa0
mov rcx, rbp
mov rdx, r12
call sub.ntdll.dll_memcpy
mov rcx, rbp
mov rdx, rbx
call fcn.00476906
mov rcx, r15
mov rdx, rbp
call fcn.00476cc5
mov cl, byte [rsp + 0x56]
cmp r14b, cl
jl 0x477b02
cmp al, cl
jl 0x477b02
mov rcx, r12
mov edx, 0xa
call fcn.004769c5
lea rcx, [rsp + 0x180]
mov edx, 0xa
call fcn.004769c5
mov rcx, rbx
mov edx, 0xa
call fcn.004769c5
inc rsi
lea r14, [rsp + 0x570]
jmp 0x4779cc
lea r15, [rsi + 1]
cmp al, cl
jge 0x477b47
cmp r14b, cl
jge 0x477b38
lea rbx, [rsp + 0xd8]
mov edx, 1
mov rcx, rbx
call fcn.00476a24
lea rdx, [rsp + 0x2d0]
mov rcx, rbx
call fcn.00477135
test al, al
je 0x477b47
mov rcx, rdi
mov rdx, r15
call fcn.00477148
test al, 1
jne 0x477b76
cmp rsi, 0x11
mov rax, qword [rsp + 0x68]
mov rcx, qword [rsp + 0x58]
jae 0x477b95
mov qword [rax], rdi
mov qword [rax + 8], r15
mov word [rax + 0x10], cx
add rsp, 0x618
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
cmp rsi, 0xf
ja 0x477b95
mov byte [rdi + rsi + 1], dl
add rsi, 2
mov rcx, qword [rsp + 0x58]
inc ecx
mov r15, rsi
mov rax, qword [rsp + 0x68]
jmp 0x477b57
ud2