Function at 0x10002f80
Capabilities:
Encode data using base64

Disassembly:
mov al, byte [0x1005aa18]
sub esp, 0x1c
test al, 1
push ebx
push ebp
push esi
push edi
jne 0x10003004
or al, 1
push 0
mov byte [0x1005aa18], al
mov al, byte [esp + 0x38]
mov ecx, 0x1005aa20
mov byte [0x1005aa20], al
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
mov edi, str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_
or ecx, 0xffffffff
xor eax, eax
push 1
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov ebx, ecx
mov ecx, 0x1005aa20
push ebx
call dword [sym.imp.MSVCP60.dll_private:_bool___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Grow_unsigned_int__bool_]
test al, al
je 0x10002ff7
mov edi, dword [0x1005aa24]
mov ecx, ebx
mov edx, ecx
mov esi, str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
push ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, 0x1005aa20
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Eos_unsigned_int_]
push 0x10004c80
call fcn.1003eed4
add esp, 4
mov al, byte [esp + 0x34]
push 0
lea ecx, [esp + 0x20]
mov byte [esp + 0x20], al
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
mov eax, dword [esp + 0x38]
xor esi, esi
mov ecx, eax
dec eax
test ecx, ecx
je 0x10003249
inc eax
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x34]
inc esi
mov dl, byte [eax]
inc eax
mov byte [esp + esi + 0xf], dl
mov bl, byte [esp + 0x11]
cmp esi, 3
mov dword [esp + 0x34], eax
jne 0x100030ff
mov al, byte [esp + 0x10]
mov dl, bl
mov cl, al
and al, 3
shl al, 4
shr dl, 4
shr cl, 2
add al, dl
mov byte [esp + 0x14], cl
mov byte [esp + 0x15], al
mov al, byte [esp + 0x12]
mov cl, bl
mov ebp, dword [sym.imp.MSVCP60.dll_void___cdecl_std::_Xlen_void_]
and cl, 0xf
mov dl, al
shl cl, 2
shr dl, 6
add cl, dl
and al, 0x3f
mov byte [esp + 0x16], cl
mov byte [esp + 0x17], al
xor edi, edi
mov ecx, dword [0x1005aa24]
test ecx, ecx
jne 0x1000309e
mov eax, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
jmp 0x100030a6
xor eax, eax
mov al, byte [esp + edi + 0x14]
add eax, ecx
mov ecx, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
mov al, byte [eax]
mov byte [esp + 0x38], al
mov edx, dword [ecx]
mov ecx, dword [esp + 0x24]
sub edx, ecx
cmp edx, 1
ja 0x100030c1
call ebp
mov eax, dword [esp + 0x24]
push 0
lea ecx, [esp + 0x20]
lea esi, [eax + 1]
push esi
call dword [sym.imp.MSVCP60.dll_private:_bool___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Grow_unsigned_int__bool_]
test al, al
je 0x100030f7
movsx ecx, byte [esp + 0x38]
mov edx, dword [esp + 0x24]
mov eax, dword [esp + 0x20]
add eax, edx
mov ch, cl
push esi
mov byte [eax], cl
lea ecx, [esp + 0x20]
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Eos_unsigned_int_]
inc edi
cmp edi, 4
jl 0x1000308d
xor esi, esi
mov eax, dword [esp + 0x18]
dec eax
mov dword [esp + 0x18], eax
jne 0x1000302e
test esi, esi
je 0x10003249
cmp esi, 3
jge 0x1000313a
mov ecx, 3
lea edi, [esp + esi + 0x10]
sub ecx, esi
xor eax, eax
mov edx, ecx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov bl, byte [esp + 0x11]
mov al, byte [esp + 0x10]
mov dl, bl
mov cl, al
and al, 3
shl al, 4
shr dl, 4
add al, dl
and bl, 0xf
shr cl, 2
mov byte [esp + 0x15], al
mov al, byte [esp + 0x12]
mov byte [esp + 0x14], cl
mov cl, al
and al, 0x3f
xor ebp, ebp
shl bl, 2
shr cl, 6
mov byte [esp + 0x17], al
lea eax, [esi + 1]
add bl, cl
mov dword [esp + 0x34], eax
test eax, eax
mov byte [esp + 0x16], bl
jle 0x100031f0
mov ecx, dword [0x1005aa24]
test ecx, ecx
jne 0x10003190
mov eax, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
jmp 0x10003198
xor eax, eax
mov al, byte [esp + ebp + 0x14]
add eax, ecx
mov edx, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
mov bl, byte [eax]
mov eax, dword [edx]
mov edx, dword [esp + 0x24]
sub eax, edx
cmp eax, 1
ja 0x100031b3
call dword [sym.imp.MSVCP60.dll_void___cdecl_std::_Xlen_void_]
mov ecx, dword [esp + 0x24]
push 0
lea edi, [ecx + 1]
lea ecx, [esp + 0x20]
push edi
call dword [sym.imp.MSVCP60.dll_private:_bool___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Grow_unsigned_int__bool_]
test al, al
je 0x100031e7
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x20]
movsx edx, bl
add ecx, eax
mov dh, dl
push edi
mov byte [ecx], dl
lea ecx, [esp + 0x20]
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Eos_unsigned_int_]
mov eax, dword [esp + 0x34]
inc ebp
cmp ebp, eax
jl 0x1000317f
cmp esi, 3
jge 0x10003249
mov edi, 4
sub edi, eax
mov ecx, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
mov edx, dword [ecx]
mov ecx, dword [esp + 0x24]
sub edx, ecx
cmp edx, 1
ja 0x10003215
call dword [sym.imp.MSVCP60.dll_void___cdecl_std::_Xlen_void_]
mov eax, dword [esp + 0x24]
push 0
lea ecx, [esp + 0x20]
lea esi, [eax + 1]
push esi
call dword [sym.imp.MSVCP60.dll_private:_bool___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Grow_unsigned_int__bool_]
test al, al
je 0x10003246
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x20]
add edx, ecx
mov byte [edx], 0x3d
mov eax, dword [esp + 0x20]
mov dword [esp + 0x24], esi
mov byte [eax + esi], 0
dec edi
jne 0x100031fc
mov esi, dword [esp + 0x30]
mov cl, byte [esp + 0x1c]
push 0
mov byte [esi], cl
mov ecx, esi
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
mov edx, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
lea ecx, [esp + 0x1c]
mov eax, dword [edx]
push eax
push 0
push ecx
mov ecx, esi
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::assign_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const___unsigned_int__unsigned_int_]
mov ecx, dword [esp + 0x20]
test ecx, ecx
je 0x100032a3
mov al, byte [ecx - 1]
test al, al
je 0x10003299
cmp al, 0xff
je 0x10003299
dec al
pop edi
mov byte [ecx - 1], al
mov eax, esi
pop esi
pop ebp
pop ebx
add esp, 0x1c
ret 0xc
dec ecx
push ecx
call fcn.1003ed30
add esp, 4
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1c
ret 0xc