Function at 0x180371940
Capabilities:
Encode data using base64
Resolve function by parsing pe exports

Disassembly:
mov qword [rsp + 0x20], r9
mov qword [rsp + 0x18], r8
mov dword [rsp + 0x10], edx
mov qword [rsp + 8], rcx
push rdi
sub rsp, 0x50
lea rcx, [0x1805d72a7]
call fcn.18024f670
cmp qword [rsp + 0x78], 0
jne 0x180371985
mov r8d, 0x28
lea rdx, [0x180565d10]
lea rcx, [0x180565d78]
call fcn.18037ab90
xor eax, eax
test eax, eax
jne 0x180371964
mov eax, dword [rsp + 0x88]
and eax, 8
test eax, eax
je 0x1803719a3
mov dword [rsp + 0x40], 0x48
jmp 0x1803719ab
mov dword [rsp + 0x40], 0x40
mov eax, dword [rsp + 0x40]
mov dword [rsp + 0x2c], eax
mov eax, dword [rsp + 0x68]
add eax, 2
xor edx, edx
mov ecx, 3
div ecx
shl eax, 2
mov dword [rsp + 0x24], eax
mov eax, dword [rsp + 0x88]
and eax, 6
cmp eax, 2
jne 0x1803719f1
xor edx, edx
mov eax, dword [rsp + 0x24]
div dword [rsp + 0x2c]
mov ecx, dword [rsp + 0x24]
add ecx, eax
mov eax, ecx
mov dword [rsp + 0x24], eax
jmp 0x180371a15
mov eax, dword [rsp + 0x88]
and eax, 6
cmp eax, 6
jne 0x180371a15
xor edx, edx
mov eax, dword [rsp + 0x24]
div dword [rsp + 0x2c]
mov ecx, dword [rsp + 0x24]
lea eax, [rcx + rax*2]
mov dword [rsp + 0x24], eax
mov eax, dword [rsp + 0x24]
inc eax
mov rcx, qword [rsp + 0x78]
cmp dword [rcx], eax
jae 0x180371a3b
mov eax, dword [rsp + 0x24]
inc eax
mov rcx, qword [rsp + 0x78]
mov dword [rcx], eax
mov eax, 6
jmp 0x180371dfc
cmp qword [rsp + 0x60], 0
jne 0x180371a5c
mov r8d, 0x38
lea rdx, [0x180565d90]
lea rcx, [0x180565df8]
call fcn.18037ab90
xor eax, eax
test eax, eax
jne 0x180371a3b
cmp qword [rsp + 0x70], 0
jne 0x180371a83
mov r8d, 0x39
lea rdx, str.E:Project_Bo4SOURCE_CODE_bods_shield_bods_shielddepslibtomcrypt_srcmisc_base64_base64_encode.c
lea rcx, [0x180565e78]
call fcn.18037ab90
xor eax, eax
test eax, eax
jne 0x180371a62
mov rax, qword [rsp + 0x70]
cmp qword [rsp + 0x60], rax
jne 0x180371a9f
mov eax, 0x10
jmp 0x180371dfc
mov rax, qword [rsp + 0x70]
mov qword [rsp + 0x30], rax
xor edx, edx
mov eax, dword [rsp + 0x68]
mov ecx, 3
div ecx
imul eax, eax, 3
mov dword [rsp + 0x28], eax
mov dword [rsp + 0x20], 0
jmp 0x180371ad2
mov eax, dword [rsp + 0x20]
add eax, 3
mov dword [rsp + 0x20], eax
mov eax, dword [rsp + 0x28]
cmp dword [rsp + 0x20], eax
jae 0x180371c71
mov eax, 1
imul rax, rax, 0
mov rcx, qword [rsp + 0x60]
movzx eax, byte [rcx + rax]
sar eax, 2
and eax, 0x3f
cdqe
mov rcx, qword [rsp + 0x30]
mov rdx, qword [rsp + 0x80]
movzx eax, byte [rdx + rax]
mov byte [rcx], al
mov rax, qword [rsp + 0x30]
inc rax
mov qword [rsp + 0x30], rax
mov eax, 1
imul rax, rax, 0
mov rcx, qword [rsp + 0x60]
movzx eax, byte [rcx + rax]
and eax, 3
shl eax, 4
mov ecx, 1
imul rcx, rcx, 1
mov rdx, qword [rsp + 0x60]
movzx ecx, byte [rdx + rcx]
sar ecx, 4
add eax, ecx
and eax, 0x3f
cdqe
mov rcx, qword [rsp + 0x30]
mov rdx, qword [rsp + 0x80]
movzx eax, byte [rdx + rax]
mov byte [rcx], al
mov rax, qword [rsp + 0x30]
inc rax
mov qword [rsp + 0x30], rax
mov eax, 1
imul rax, rax, 1
mov rcx, qword [rsp + 0x60]
movzx eax, byte [rcx + rax]
and eax, 0xf
mov ecx, 1
imul rcx, rcx, 2
mov rdx, qword [rsp + 0x60]
movzx ecx, byte [rdx + rcx]
sar ecx, 6
lea eax, [rcx + rax*4]
and eax, 0x3f
cdqe
mov rcx, qword [rsp + 0x30]
mov rdx, qword [rsp + 0x80]
movzx eax, byte [rdx + rax]
mov byte [rcx], al
mov rax, qword [rsp + 0x30]
inc rax
mov qword [rsp + 0x30], rax
mov eax, 1
imul rax, rax, 2
mov rcx, qword [rsp + 0x60]
movzx eax, byte [rcx + rax]
and eax, 0x3f
cdqe
mov rcx, qword [rsp + 0x30]
mov rdx, qword [rsp + 0x80]
movzx eax, byte [rdx + rax]
mov byte [rcx], al
mov rax, qword [rsp + 0x30]
inc rax
mov qword [rsp + 0x30], rax
mov rax, qword [rsp + 0x60]
add rax, 3
mov qword [rsp + 0x60], rax
mov rax, qword [rsp + 0x70]
mov rcx, qword [rsp + 0x30]
sub rcx, rax
mov rax, rcx
mov ecx, dword [rsp + 0x2c]
cqo
idiv rcx
mov rax, rdx
test rax, rax
jne 0x180371c6c
mov eax, dword [rsp + 0x88]
and eax, 4
test eax, eax
je 0x180371c49
mov rax, qword [rsp + 0x30]
mov byte [rax], 0xd
mov rax, qword [rsp + 0x30]
inc rax
mov qword [rsp + 0x30], rax
mov eax, dword [rsp + 0x88]
and eax, 2
test eax, eax
je 0x180371c6c
mov rax, qword [rsp + 0x30]
mov byte [rax], 0xa
mov rax, qword [rsp + 0x30]
inc rax
mov qword [rsp + 0x30], rax
jmp 0x180371ac7
mov eax, dword [rsp + 0x68]
cmp dword [rsp + 0x20], eax
jae 0x180371ddb
mov eax, 1
imul rax, rax, 0
mov rcx, qword [rsp + 0x60]
movzx eax, byte [rcx + rax]
mov dword [rsp + 0x38], eax
mov eax, dword [rsp + 0x20]
inc eax
cmp eax, dword [rsp + 0x68]
jae 0x180371cb9
mov eax, 1
imul rax, rax, 1
mov rcx, qword [rsp + 0x60]
movzx eax, byte [rcx + rax]
mov dword [rsp + 0x44], eax
jmp 0x180371cc1
mov dword [rsp + 0x44], 0
mov eax, dword [rsp + 0x44]
mov dword [rsp + 0x3c], eax
mov eax, dword [rsp + 0x38]
shr eax, 2
and eax, 0x3f
mov eax, eax
mov rcx, qword [rsp + 0x30]
mov rdx, qword [rsp + 0x80]
movzx eax, byte [rdx + rax]
mov byte [rcx], al
mov rax, qword [rsp + 0x30]
inc rax
mov qword [rsp + 0x30], rax
mov eax, dword [rsp + 0x38]
and eax, 3
shl eax, 4
mov ecx, dword [rsp + 0x3c]
shr ecx, 4
add eax, ecx
and eax, 0x3f
mov eax, eax
mov rcx, qword [rsp + 0x30]
mov rdx, qword [rsp + 0x80]
movzx eax, byte [rdx + rax]
mov byte [rcx], al
mov rax, qword [rsp + 0x30]
inc rax
mov qword [rsp + 0x30], rax
mov eax, dword [rsp + 0x88]
and eax, 1
test eax, eax
je 0x180371da0
mov eax, dword [rsp + 0x20]
inc eax
cmp eax, dword [rsp + 0x68]
jae 0x180371d68
mov eax, dword [rsp + 0x3c]
and eax, 0xf
shl eax, 2
and eax, 0x3f
mov eax, eax
mov rcx, qword [rsp + 0x80]
movsx eax, byte [rcx + rax]
mov dword [rsp + 0x48], eax
jmp 0x180371d70
mov dword [rsp + 0x48], 0x3d
mov rax, qword [rsp + 0x30]
movzx ecx, byte [rsp + 0x48]
mov byte [rax], cl
mov rax, qword [rsp + 0x30]
inc rax
mov qword [rsp + 0x30], rax
mov rax, qword [rsp + 0x30]
mov byte [rax], 0x3d
mov rax, qword [rsp + 0x30]
inc rax
mov qword [rsp + 0x30], rax
jmp 0x180371ddb
mov eax, dword [rsp + 0x20]
inc eax
cmp eax, dword [rsp + 0x68]
jae 0x180371ddb
mov eax, dword [rsp + 0x3c]
and eax, 0xf
shl eax, 2
and eax, 0x3f
mov eax, eax
mov rcx, qword [rsp + 0x30]
mov rdx, qword [rsp + 0x80]
movzx eax, byte [rdx + rax]
mov byte [rcx], al
mov rax, qword [rsp + 0x30]
inc rax
mov qword [rsp + 0x30], rax
mov rax, qword [rsp + 0x30]
mov byte [rax], 0
mov rax, qword [rsp + 0x70]
mov rcx, qword [rsp + 0x30]
sub rcx, rax
mov rax, rcx
mov rcx, qword [rsp + 0x78]
mov dword [rcx], eax
xor eax, eax
add rsp, 0x50
pop rdi
ret