Function at 0x5f7870
Capabilities:
Encode data using base64

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
lea ebx, [ebp - 0x9a]
lea edi, [ebp - 0x98]
mov esi, str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_
sub esp, 0xcc
mov eax, dword [str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_]
mov edx, dword [str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789__]
mov dword [ebp - 0xc0], ecx
mov dword [ebp - 0x9a], eax
mov eax, dword [0x74252d]
mov dword [ebp - 0x5d], eax
mov eax, ebx
sub eax, edi
mov ecx, eax
sub esi, eax
lea eax, [ebp - 0x59]
add ecx, 0x41
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov dword [ebp - 0x59], edx
mov edx, dword [0x742571]
lea edi, [ebp - 0x58]
mov esi, str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789__
mov dword [ebp - 0x1c], edx
mov edx, eax
sub edx, edi
mov ecx, edx
sub esi, edx
mov edx, 0x55555556
add ecx, 0x41
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
test byte [ebp + 0xc], 1
cmovne ebx, eax
mov eax, dword [ebp + 8]
mov eax, dword [eax]
mov ecx, dword [eax + 4]
mov dword [esp + 0xc], 0
mov dword [esp + 4], 4
mov dword [esp], 1
add ecx, 2
mov eax, ecx
sar ecx, 0x1f
imul edx
sub edx, ecx
lea esi, [edx*4]
lea eax, [esi + 1]
mov dword [esp + 8], eax
call fcn.004a4d50
mov edi, dword [ebp - 0xc0]
test eax, eax
mov dword [edi], eax
je 0x5f7baf
mov dword [eax + 4], esi
add esi, eax
add esi, dword [eax + 0xc]
mov eax, dword [ebp - 0xc0]
mov byte [esi], 0
mov eax, dword [eax]
mov edx, dword [eax]
cmp edx, 1
jbe 0x5f7b90
movsx edx, byte [eax + 0xb]
mov esi, dword [ebp - 0xc0]
mov ecx, esi
shr edx, 0x1f
mov dword [esp + 4], edx
mov eax, dword [eax + 4]
add eax, 1
mov dword [esp], eax
call fcn.004a5590
mov edx, dword [esi]
sub esp, 8
mov ecx, dword [edx + 0xc]
mov eax, dword [ebp + 0xc]
lea edi, [edx + ecx]
xor esi, esi
mov dword [ebp - 0xb0], 0
mov dword [ebp - 0xb8], ebx
mov dword [ebp - 0xac], edi
and eax, 2
mov dword [ebp - 0xc4], eax
mov eax, dword [ebp + 8]
mov eax, dword [eax]
mov edx, dword [eax + 4]
cmp edx, esi
jle 0x5f7a75
mov edi, dword [eax + 0xc]
lea ecx, [esi + 1]
mov ebx, edi
lea edi, [eax + esi]
mov dword [ebp - 0xb4], ebx
movzx edi, byte [edi + ebx]
shl edi, 0x10
cmp edx, ecx
je 0x5f7ae0
lea ebx, [esi + 2]
add ecx, eax
mov dword [ebp - 0xbc], ebx
mov ebx, dword [ebp - 0xb4]
movzx ecx, byte [ecx + ebx]
shl ecx, 8
or edi, ecx
cmp edx, dword [ebp - 0xbc]
je 0x5f7b00
add eax, dword [ebp - 0xbc]
add esi, 3
movzx eax, byte [eax + ebx]
or edi, eax
mov ecx, edi
and ecx, 0x3f
mov edx, dword [ebp - 0xb8]
mov eax, edi
mov ebx, dword [ebp - 0xac]
sar eax, 0x12
movzx eax, byte [edx + eax]
mov byte [ebx], al
mov eax, edi
sar eax, 0xc
and eax, 0x3f
cmp dword [ebp - 0xb0], 2
movzx eax, byte [edx + eax]
mov byte [ebx + 1], al
jne 0x5f7aa0
mov edi, dword [ebp - 0xc4]
test edi, edi
jne 0x5f7af3
lea eax, [ebx + 3]
mov byte [ebx + 2], 0x3d
lea edx, [eax + 1]
mov byte [eax], 0x3d
mov eax, dword [ebp + 8]
mov dword [ebp - 0xac], edx
mov eax, dword [eax]
mov edx, dword [eax + 4]
cmp edx, esi
jg 0x5f79bb
mov eax, dword [ebp - 0xac]
mov edi, eax
mov eax, dword [ebp - 0xc4]
test eax, eax
jne 0x5f7b20
mov eax, dword [ebp - 0xc0]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret 8
sar edi, 6
mov ebx, dword [ebp - 0xb0]
and edi, 0x3f
movzx eax, byte [edx + edi]
mov edx, dword [ebp - 0xac]
test ebx, ebx
mov byte [edx + 2], al
jne 0x5f7bd6
mov eax, dword [ebp - 0xb8]
movzx eax, byte [eax + ecx]
mov byte [edx + 3], al
lea eax, [edx + 4]
mov dword [ebp - 0xac], eax
jmp 0x5f79ab
mov esi, edx
xor ecx, ecx
mov dword [ebp - 0xb0], 2
jmp 0x5f7a15
add dword [ebp - 0xac], 2
jmp 0x5f79ab
mov ecx, edi
mov esi, edx
mov dword [ebp - 0xb0], 1
and ecx, 0x3f
jmp 0x5f7a15
mov eax, dword [ebp - 0xc0]
mov edx, dword [eax]
mov eax, dword [edx]
cmp eax, 1
jbe 0x5f7ba3
movsx eax, byte [edx + 0xb]
mov esi, dword [ebp - 0xc0]
mov ecx, esi
shr eax, 0x1f
mov dword [esp + 4], eax
mov eax, dword [edx + 4]
add eax, 1
mov dword [esp], eax
call fcn.004a5590
mov ecx, dword [esi]
sub esp, 8
mov eax, dword [ecx + 0xc]
add eax, ecx
mov esi, edi
sub esi, eax
cmp esi, dword [ecx + 4]
jge 0x5f7a8b
mov ecx, dword [ebp - 0xc0]
mov dword [esp], esi
call fcn.004a7d10
mov eax, dword [ebp - 0xc0]
sub esp, 4
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret 8
mov ecx, dword [eax + 0xc]
mov edx, eax
cmp ecx, 0x10
jne 0x5f795b
jmp 0x5f7984
mov eax, dword [edx + 0xc]
mov ecx, edx
cmp eax, 0x10
jne 0x5f7b2f
jmp 0x5f7b58
call fcn.0071fff4
mov eax, dword [ebp - 0xc0]
mov eax, dword [eax]
jmp 0x5f793d
add dword [ebp - 0xac], 3
cmp dword [ebp - 0xc4], 0
je 0x5f7bf5
mov dword [ebp - 0xb0], 1
jmp 0x5f79ab
mov eax, dword [ebp - 0xac]
jmp 0x5f7a59