Function at 0x101ff1a0
Capabilities:
Encode data using base64

Disassembly:
sub esp, 0xc
push ebp
push esi
push edi
mov edi, dword [esp + 0x1c]
test edi, edi
je 0x101ff3a3
mov esi, dword [esp + 0x24]
test esi, esi
je 0x101ff3a3
mov ebp, dword [esp + 0x28]
test ebp, ebp
je 0x101ff3a3
mov eax, dword [esp + 0x2c]
push ebx
mov ebx, dword [esp + 0x24]
push eax
push ebx
call fcn.101ff0f0
add esp, 8
cmp dword [ebp], eax
jge 0x101ff1ec
pop ebx
pop edi
pop esi
xor eax, eax
pop ebp
add esp, 0xc
ret
mov eax, 0x55555556
imul ebx
mov ebx, edx
shr ebx, 0x1f
add ebx, edx
lea ecx, [ebx*4]
mov eax, 0x6bca1af3
imul ecx
sar edx, 5
mov ebp, edx
shr ebp, 0x1f
add ebp, edx
xor ecx, ecx
mov eax, 0x13
mov dword [esp + 0x20], 0
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], ecx
test ebp, ebp
jl 0x101ff30f
mov edx, dword [esp + 0x30]
and edx, 2
mov dword [esp + 0x18], edx
cmp ecx, ebp
jne 0x101ff25b
mov edx, ebp
imul edx, edx, 0x4c
lea eax, [ebx*4]
sub eax, edx
cdq
and edx, 3
add eax, edx
sar eax, 2
mov dword [esp + 0x10], eax
test eax, eax
jle 0x101ff2cd
mov edx, eax
movzx ecx, byte [edi]
movzx eax, byte [edi + 1]
shl ecx, 8
or ecx, eax
movzx eax, byte [edi + 2]
shl ecx, 8
or ecx, eax
shl ecx, 8
mov eax, ecx
shr eax, 0x1a
movzx eax, byte [eax + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_.Base64Encoder.cpp]
mov byte [esi], al
shl ecx, 6
mov eax, ecx
shr eax, 0x1a
movzx eax, byte [eax + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_.Base64Encoder.cpp]
shl ecx, 6
mov byte [esi + 1], al
mov eax, ecx
shr eax, 0x1a
movzx eax, byte [eax + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_.Base64Encoder.cpp]
shr ecx, 0x14
and ecx, 0x3f
mov byte [esi + 2], al
mov cl, byte [ecx + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_.Base64Encoder.cpp]
mov byte [esi + 3], cl
add edi, 3
add esi, 4
sub edx, 1
jne 0x101ff261
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
cmp dword [esp + 0x18], 0
mov edx, dword [esp + 0x20]
lea edx, [edx + eax*4]
mov dword [esp + 0x20], edx
jne 0x101ff2ec
mov byte [esi], 0xd
inc esi
mov byte [esi], 0xa
inc esi
add dword [esp + 0x20], 2
inc ecx
cmp ecx, ebp
mov dword [esp + 0x14], ecx
jle 0x101ff23e
cmp dword [esp + 0x20], 0
je 0x101ff30f
cmp dword [esp + 0x18], 0
jne 0x101ff30f
sub esi, 2
sub dword [esp + 0x20], 2
mov ecx, dword [esp + 0x24]
lea eax, [ebx + ebx*2]
sub ecx, eax
je 0x101ff38c
lea ebp, [ecx + 1]
test ebp, ebp
je 0x101ff38c
xor eax, eax
test ecx, ecx
jle 0x101ff32b
movzx eax, byte [edi]
inc edi
shl eax, 8
cmp ecx, 1
jle 0x101ff339
movzx edx, byte [edi]
or eax, edx
inc edi
shl eax, 8
cmp ecx, 2
jle 0x101ff346
movzx ecx, byte [edi]
or eax, ecx
shl eax, 8
test ebp, ebp
jle 0x101ff366
mov ecx, ebp
nop
mov edx, eax
shr edx, 0x1a
mov dl, byte [edx + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_.Base64Encoder.cpp]
mov byte [esi], dl
inc esi
shl eax, 6
sub ecx, 1
jne 0x101ff350
add dword [esp + 0x20], ebp
test byte [esp + 0x30], 1
jne 0x101ff38c
mov edi, 4
sub edi, ebp
test edi, edi
jle 0x101ff388
push edi
push 0x3d
push esi
call fcn.10232610
add esp, 0xc
add dword [esp + 0x20], edi
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x20]
pop ebx
pop edi
pop esi
mov dword [eax], ecx
mov eax, 1
pop ebp
add esp, 0xc
ret
pop edi
pop esi
xor eax, eax
pop ebp
add esp, 0xc
ret