Function at 0x506110
Capabilities:
Encode data using base64

Disassembly:
sub esp, 0xc
push ebx
push ebp
push esi
mov esi, eax
mov eax, 0x55555556
imul dword [esp + 0x1c]
push edi
mov edi, ecx
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
lea edx, [ecx*4]
mov eax, 0x6bca1af3
imul edx
sar edx, 5
mov ebx, edx
xor ebp, ebp
shr ebx, 0x1f
add ebx, edx
cmp edi, ebp
mov dword [esp + 0x10], ebp
mov dword [esp + 0x18], ecx
lea eax, [ebp + 0x13]
je 0x5062b0
cmp esi, ebp
je 0x5062b0
cmp dword [esp + 0x24], ebp
je 0x5062b0
test ebx, ebx
mov dword [esp + 0x14], ebp
jl 0x50621a
cmp ebp, ebx
jne 0x506191
mov edx, ebx
imul edx, edx, 0x4c
lea eax, [ecx*4]
sub eax, edx
cdq
and edx, 3
add eax, edx
sar eax, 2
test eax, eax
jle 0x506200
mov ebp, eax
movzx edx, byte [edi + 2]
xor ecx, ecx
mov ch, byte [edi]
add edi, 3
add esi, 4
mov cl, byte [edi - 2]
shl ecx, 8
or ecx, edx
shl ecx, 8
mov edx, ecx
shr edx, 0x1a
movzx edx, byte [edx + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_CONNECT__s:_d_HTTP_1.1_r_nAccept:___r_nHost:__s:_d_r_nUser_Agent:_Mozilla_4.0__compatible__MSIE_8.0__Windows_NT_5.1_Proxy_Connection:_Keep_Alive_r_n_r_n]
mov byte [esi - 4], dl
shl ecx, 6
mov edx, ecx
shr edx, 0x1a
movzx edx, byte [edx + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_CONNECT__s:_d_HTTP_1.1_r_nAccept:___r_nHost:__s:_d_r_nUser_Agent:_Mozilla_4.0__compatible__MSIE_8.0__Windows_NT_5.1_Proxy_Connection:_Keep_Alive_r_n_r_n]
shl ecx, 6
mov byte [esi - 3], dl
mov edx, ecx
shr edx, 0x1a
movzx edx, byte [edx + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_CONNECT__s:_d_HTTP_1.1_r_nAccept:___r_nHost:__s:_d_r_nUser_Agent:_Mozilla_4.0__compatible__MSIE_8.0__Windows_NT_5.1_Proxy_Connection:_Keep_Alive_r_n_r_n]
shr ecx, 0x14
and ecx, 0x3f
sub ebp, 1
mov byte [esi - 2], dl
movzx ecx, byte [ecx + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_CONNECT__s:_d_HTTP_1.1_r_nAccept:___r_nHost:__s:_d_r_nUser_Agent:_Mozilla_4.0__compatible__MSIE_8.0__Windows_NT_5.1_Proxy_Connection:_Keep_Alive_r_n_r_n]
mov byte [esi - 1], cl
jne 0x506197
mov ebp, dword [esp + 0x14]
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x10]
add ebp, 1
cmp ebp, ebx
lea edx, [edx + eax*4]
mov dword [esp + 0x10], edx
mov dword [esp + 0x14], ebp
jle 0x506178
lea eax, [ecx + ecx*2]
mov ecx, dword [esp + 0x20]
sub ecx, eax
je 0x506297
lea ebp, [ecx + 1]
test ebp, ebp
je 0x506297
xor eax, eax
test ecx, ecx
jle 0x506238
movzx eax, byte [edi]
add edi, 1
shl eax, 8
cmp ecx, 1
jle 0x506248
movzx edx, byte [edi]
or eax, edx
add edi, 1
shl eax, 8
cmp ecx, 2
jle 0x506255
movzx ecx, byte [edi]
or eax, ecx
shl eax, 8
test ebp, ebp
jle 0x506278
mov ecx, ebp
mov edi, edi
mov edx, eax
shr edx, 0x1a
mov dl, byte [edx + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_CONNECT__s:_d_HTTP_1.1_r_nAccept:___r_nHost:__s:_d_r_nUser_Agent:_Mozilla_4.0__compatible__MSIE_8.0__Windows_NT_5.1_Proxy_Connection:_Keep_Alive_r_n_r_n]
mov byte [esi], dl
add esi, 1
shl eax, 6
sub ecx, 1
jne 0x506260
add dword [esp + 0x10], ebp
mov edi, 4
sub edi, ebp
test edi, edi
jle 0x506293
push edi
push 0x3d
push esi
call fcn.005da970
add esp, 0xc
add dword [esp + 0x10], edi
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x24]
pop edi
pop esi
pop ebp
mov dword [ecx], eax
mov eax, 1
pop ebx
add esp, 0xc
ret 8
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0xc
ret 8