Function at 0x407f40
Capabilities:
Encode data using base64

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x419ac0
mov eax, dword fs:[0]
push eax
sub esp, 0x14
push ebx
push esi
push edi
mov eax, dword [0x427a08]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
xor ecx, ecx
mov dword [ebp - 0x20], ecx
mov esi, dword [ebp + 8]
mov dword [esi + 0x14], 0xf
mov dword [esi + 0x10], ecx
mov byte [esi], cl
mov edx, dword [ebp + 0xc]
xor edi, edi
mov dword [ebp - 4], ecx
mov dword [ebp - 0x20], 1
mov dword [ebp - 0x1c], ecx
cmp dword [edx + 0x10], ecx
jbe 0x408257
cmp dword [edx + 0x14], 0x10
jb 0x407fa1
mov eax, dword [edx]
jmp 0x407fa3
mov eax, edx
mov al, byte [eax + ecx]
mov byte [ebp + edi - 0x10], al
inc edi
mov dword [ebp - 0x14], edi
cmp edi, 3
jne 0x4080a1
mov al, byte [ebp - 0x10]
mov cl, al
and al, 3
shl al, 4
shr cl, 2
mov dl, al
mov al, byte [ebp - 0xf]
mov byte [ebp - 0x18], cl
mov cl, al
and al, 0xf
add al, al
shr cl, 4
add dl, cl
mov byte [ebp - 0x17], dl
lea edx, [eax + eax]
mov al, byte [ebp - 0xe]
mov cl, al
shr cl, 6
and al, 0x3f
mov byte [ebp - 0x15], al
add edx, ecx
mov byte [ebp - 0x16], dl
xor edx, edx
mov dword [ebp - 0x14], edx
cmp dword [0x42711c], 0x10
mov eax, dword [0x427108]
jae 0x408007
mov eax, 0x427108
movzx ecx, byte [ebp + edx - 0x18]
mov bl, byte [ecx + eax]
mov eax, dword [esi + 0x10]
or ecx, 0xffffffff
sub ecx, eax
cmp ecx, 1
jbe 0x40815f
lea edi, [eax + 1]
cmp edi, 0xfffffffe
ja 0x40815f
mov ecx, dword [esi + 0x14]
cmp ecx, edi
jae 0x408041
push eax
push edi
mov ecx, esi
call fcn.0040e270
mov edx, dword [ebp - 0x14]
jmp 0x408056
test edi, edi
jne 0x408058
mov dword [esi + 0x10], edi
cmp ecx, 0x10
jb 0x408051
mov eax, dword [esi]
jmp 0x408053
mov eax, esi
mov byte [eax], 0
test edi, edi
setne al
test al, al
je 0x408084
cmp dword [esi + 0x14], 0x10
mov ecx, dword [esi + 0x10]
jb 0x40806c
mov eax, dword [esi]
jmp 0x40806e
mov eax, esi
mov byte [eax + ecx], bl
cmp dword [esi + 0x14], 0x10
mov dword [esi + 0x10], edi
jb 0x40807e
mov eax, dword [esi]
jmp 0x408080
mov eax, esi
mov byte [eax + edi], 0
inc edx
mov dword [ebp - 0x14], edx
cmp edx, 4
jl 0x407ff4
mov edx, dword [ebp + 0xc]
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0x14], 0
mov edi, dword [ebp - 0x14]
inc ecx
mov dword [ebp - 0x1c], ecx
cmp ecx, dword [edx + 0x10]
jb 0x407f97
test edi, edi
je 0x408257
cmp edi, 3
jge 0x4080d2
mov edx, 3
sub edx, edi
push edx
lea eax, [ebp + edi - 0x10]
push 0
push eax
call fcn.00417dea
add esp, 0xc
mov al, byte [ebp - 0x10]
mov cl, al
and al, 3
shl al, 4
mov dl, al
mov al, byte [ebp - 0xf]
shr cl, 2
mov byte [ebp - 0x18], cl
mov cl, al
and al, 0xf
add al, al
shr cl, 4
add dl, cl
mov byte [ebp - 0x17], dl
lea edx, [eax + eax]
mov al, byte [ebp - 0xe]
mov cl, al
shr cl, 6
and al, 0x3f
mov byte [ebp - 0x15], al
lea eax, [edi + 1]
add edx, ecx
mov byte [ebp - 0x16], dl
xor edx, edx
mov dword [ebp + 0xc], edx
test eax, eax
jle 0x4081c0
cmp dword [0x42711c], 0x10
mov eax, dword [0x427108]
jae 0x40812d
mov eax, 0x427108
movzx ecx, byte [ebp + edx - 0x18]
mov bl, byte [ecx + eax]
mov eax, dword [esi + 0x10]
or ecx, 0xffffffff
sub ecx, eax
cmp ecx, 1
jbe 0x40815f
lea edi, [eax + 1]
cmp edi, 0xfffffffe
ja 0x40815f
mov ecx, dword [esi + 0x14]
cmp ecx, edi
jae 0x40816a
push eax
push edi
mov ecx, esi
call fcn.0040e270
mov edx, dword [ebp + 0xc]
jmp 0x40817f
push str.string_too_long
call dword [0x41c450]
test edi, edi
jne 0x408181
mov dword [esi + 0x10], edi
cmp ecx, 0x10
jb 0x40817a
mov eax, dword [esi]
jmp 0x40817c
mov eax, esi
mov byte [eax], 0
test edi, edi
setne al
test al, al
je 0x4081ad
cmp dword [esi + 0x14], 0x10
mov ecx, dword [esi + 0x10]
jb 0x408195
mov eax, dword [esi]
jmp 0x408197
mov eax, esi
mov byte [eax + ecx], bl
cmp dword [esi + 0x14], 0x10
mov dword [esi + 0x10], edi
jb 0x4081a7
mov eax, dword [esi]
jmp 0x4081a9
mov eax, esi
mov byte [eax + edi], 0
mov eax, dword [ebp - 0x14]
inc edx
inc eax
mov dword [ebp + 0xc], edx
cmp edx, eax
jl 0x40811a
mov edi, dword [ebp - 0x14]
cmp edi, 3
jge 0x408257
jmp 0x4081d3
mov edi, dword [ebp - 0x14]
mov eax, dword [esi + 0x10]
or edx, 0xffffffff
inc edi
sub edx, eax
mov dword [ebp - 0x14], edi
cmp edx, 1
jbe 0x40815f
lea edi, [eax + 1]
cmp edi, 0xfffffffe
ja 0x40815f
mov ecx, dword [esi + 0x14]
cmp ecx, edi
jae 0x408206
push eax
push edi
mov ecx, esi
call fcn.0040e270
jmp 0x40821b
test edi, edi
jne 0x40821d
mov dword [esi + 0x10], edi
cmp ecx, 0x10
jb 0x408216
mov eax, dword [esi]
jmp 0x408218
mov eax, esi
mov byte [eax], 0
test edi, edi
setne al
test al, al
je 0x40824d
mov ecx, dword [esi + 0x10]
mov edx, 0x10
cmp dword [esi + 0x14], edx
jb 0x408235
mov eax, dword [esi]
jmp 0x408237
mov eax, esi
mov byte [ecx + eax], 0x3d
mov dword [esi + 0x10], edi
cmp dword [esi + 0x14], edx
jb 0x408247
mov eax, dword [esi]
jmp 0x408249
mov eax, esi
mov byte [edi + eax], 0
cmp dword [ebp - 0x14], 3
jl 0x4081d0
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret