Function at 0x402130
Capabilities:
Encode data using base64

Disassembly:
push 0xffffffffffffffff
push 0x41e019
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x1c
mov al, byte [esp + 0x30]
push ebx
push ebp
push esi
xor ebp, ebp
push edi
push ebp
lea ecx, [esp + 0x20]
mov dword [esp + 0x1c], ebp
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 + 0x44]
xor esi, esi
mov ecx, eax
dec eax
test ecx, ecx
mov dword [esp + 0x34], ebp
je 0x40239d
inc eax
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x40]
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 + 0x40], eax
jne 0x402252
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 [0x428dc4]
test ecx, ecx
jne 0x4021ef
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 0x4021f7
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 + 0x44], al
mov edx, dword [ecx]
mov ecx, dword [esp + 0x24]
sub edx, ecx
cmp edx, 1
ja 0x402212
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 0x402248
movsx ecx, byte [esp + 0x44]
mov edx, dword [esp + 0x20]
mov eax, dword [esp + 0x24]
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 0x4021de
xor esi, esi
xor ebp, ebp
mov eax, dword [esp + 0x18]
dec eax
mov dword [esp + 0x18], eax
jne 0x40217f
cmp esi, ebp
je 0x40239d
cmp esi, 3
jge 0x40228d
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
shl bl, 2
shr cl, 6
mov byte [esp + 0x17], al
lea eax, [esi + 1]
add bl, cl
mov dword [esp + 0x40], eax
test eax, eax
mov byte [esp + 0x16], bl
jle 0x402342
mov ecx, dword [0x428dc4]
test ecx, ecx
jne 0x4022e1
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 0x4022e9
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 0x402304
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 0x402339
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x24]
movsx edx, bl
add ecx, eax
mov dh, dl
mov byte [ecx], dl
mov ecx, dword [esp + 0x20]
mov dword [esp + 0x24], edi
mov byte [ecx + edi], 0
mov eax, dword [esp + 0x40]
inc ebp
cmp ebp, eax
jl 0x4022d0
cmp esi, 3
jge 0x40239b
mov edi, 4
sub edi, eax
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 eax, dword [edx]
mov edx, dword [esp + 0x24]
sub eax, edx
cmp eax, 1
ja 0x402367
call dword [sym.imp.MSVCP60.dll_void___cdecl_std::_Xlen_void_]
mov ecx, dword [esp + 0x24]
push 0
lea esi, [ecx + 1]
lea ecx, [esp + 0x20]
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 0x402398
mov edx, dword [esp + 0x20]
mov eax, dword [esp + 0x24]
add eax, edx
mov byte [eax], 0x3d
mov ecx, dword [esp + 0x20]
mov dword [esp + 0x24], esi
mov byte [ecx + esi], 0
dec edi
jne 0x40234e
xor ebp, ebp
mov esi, dword [esp + 0x3c]
mov dl, byte [esp + 0x1c]
mov byte [esi], dl
mov dword [esi + 4], ebp
mov dword [esi + 8], ebp
mov dword [esi + 0xc], ebp
mov eax, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
lea edx, [esp + 0x1c]
mov ecx, dword [eax]
push ecx
push ebp
push edx
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]
cmp ecx, ebp
je 0x4023ea
mov al, byte [ecx - 1]
test al, al
je 0x4023e0
cmp al, 0xff
je 0x4023e0
dec al
mov byte [ecx - 1], al
jmp 0x4023ea
dec ecx
push ecx
call sub.MFC42.DLL_operatordelete
add esp, 4
mov ecx, dword [esp + 0x2c]
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x28
ret