Function at 0x540760
Capabilities:
Encode data using base64

Disassembly:
push 0xffffffffffffffff
push 0x592bf9
mov eax, dword fs:[0]
push eax
sub esp, 0x10
push ebx
push ebp
push esi
push edi
mov eax, dword [0x629d58]
xor eax, esp
push eax
lea eax, [esp + 0x24]
mov dword fs:[0], eax
mov dword [esp + 0x20], 0
mov esi, dword [esp + 0x34]
mov dword [esi + 0x14], 0xf
mov dword [esi + 0x10], 0
mov byte [esi], 0
xor ebp, ebp
mov dword [esp + 0x2c], 0
mov dword [esp + 0x20], 1
cmp dword [esp + 0x3c], ebp
je 0x540a6c
mov eax, dword [esp + 0x38]
mov cl, byte [eax]
dec dword [esp + 0x3c]
mov byte [esp + ebp + 0x14], cl
inc ebp
inc eax
mov dword [esp + 0x38], eax
cmp ebp, 3
jne 0x5408c4
mov al, byte [esp + 0x14]
mov dl, al
and al, 3
shl al, 4
shr dl, 2
mov cl, al
mov al, byte [esp + 0x15]
mov byte [esp + 0x18], dl
mov dl, al
and al, 0xf
add al, al
shr dl, 4
add cl, dl
mov byte [esp + 0x19], cl
lea ecx, [eax + eax]
mov al, byte [esp + 0x16]
mov dl, al
shr dl, 6
and al, 0x3f
mov byte [esp + 0x1b], al
add ecx, edx
xor edx, edx
mov byte [esp + 0x1a], cl
mov dword [esp + 0x1c], edx
mov eax, dword [0x63254c]
mov ebp, 0x10
cmp dword [0x632560], ebp
jae 0x540839
mov eax, 0x63254c
movzx ecx, byte [esp + edx + 0x18]
mov bl, byte [ecx + eax]
mov eax, dword [esi + 0x10]
or ecx, 0xffffffff
sub ecx, eax
cmp ecx, 1
jbe 0x540996
lea edi, [eax + 1]
cmp edi, 0xfffffffe
ja 0x540996
mov ecx, dword [esi + 0x14]
cmp ecx, edi
jae 0x540874
push eax
push edi
mov ecx, esi
call fcn.004039b0
mov edx, dword [esp + 0x1c]
jmp 0x540888
test edi, edi
jne 0x54088a
mov dword [esi + 0x10], edi
cmp ecx, ebp
jb 0x540883
mov eax, dword [esi]
jmp 0x540885
mov eax, esi
mov byte [eax], 0
test edi, edi
setne al
test al, al
je 0x5408b4
mov ecx, dword [esi + 0x10]
cmp dword [esi + 0x14], ebp
jb 0x54089d
mov eax, dword [esi]
jmp 0x54089f
mov eax, esi
mov byte [eax + ecx], bl
mov dword [esi + 0x10], edi
cmp dword [esi + 0x14], ebp
jb 0x5408ae
mov eax, dword [esi]
jmp 0x5408b0
mov eax, esi
mov byte [eax + edi], 0
inc edx
mov dword [esp + 0x1c], edx
cmp edx, 4
jl 0x540822
xor ebp, ebp
cmp dword [esp + 0x3c], 0
jne 0x5407c0
test ebp, ebp
je 0x540a6c
cmp ebp, 3
jge 0x5408f3
mov edx, 3
sub edx, ebp
push edx
lea eax, [esp + ebp + 0x18]
push 0
push eax
call fcn.004fc2f0
add esp, 0xc
mov al, byte [esp + 0x14]
mov cl, al
and al, 3
shl al, 4
mov dl, al
mov al, byte [esp + 0x15]
shr cl, 2
mov byte [esp + 0x18], cl
mov cl, al
and al, 0xf
add al, al
shr cl, 4
add dl, cl
mov byte [esp + 0x19], dl
lea edx, [eax + eax]
mov al, byte [esp + 0x16]
mov cl, al
shr cl, 6
and al, 0x3f
mov byte [esp + 0x1b], al
lea eax, [ebp + 1]
add edx, ecx
mov byte [esp + 0x1a], dl
xor edx, edx
mov dword [esp + 0x3c], edx
test eax, eax
jle 0x5409f3
jmp 0x540950
cmp dword [0x632560], 0x10
mov eax, dword [0x63254c]
jae 0x540963
mov eax, 0x63254c
movzx ecx, byte [esp + edx + 0x18]
mov bl, byte [ecx + eax]
mov eax, dword [esi + 0x10]
or ecx, 0xffffffff
sub ecx, eax
cmp ecx, 1
jbe 0x540996
lea edi, [eax + 1]
cmp edi, 0xfffffffe
ja 0x540996
mov ecx, dword [esi + 0x14]
cmp ecx, edi
jae 0x5409a0
push eax
push edi
mov ecx, esi
call fcn.004039b0
mov edx, dword [esp + 0x3c]
jmp 0x5409b5
push str.string_too_long
call fcn.0056b09a
test edi, edi
jne 0x5409b7
mov dword [esi + 0x10], edi
cmp ecx, 0x10
jb 0x5409b0
mov eax, dword [esi]
jmp 0x5409b2
mov eax, esi
mov byte [eax], 0
test edi, edi
setne al
test al, al
je 0x5409e3
cmp dword [esi + 0x14], 0x10
mov ecx, dword [esi + 0x10]
jb 0x5409cb
mov eax, dword [esi]
jmp 0x5409cd
mov eax, esi
mov byte [eax + ecx], bl
cmp dword [esi + 0x14], 0x10
mov dword [esi + 0x10], edi
jb 0x5409dd
mov eax, dword [esi]
jmp 0x5409df
mov eax, esi
mov byte [eax + edi], 0
inc edx
lea eax, [ebp + 1]
mov dword [esp + 0x3c], edx
cmp edx, eax
jl 0x540950
cmp ebp, 3
jge 0x540a6c
mov eax, dword [esi + 0x10]
or edx, 0xffffffff
sub edx, eax
inc ebp
cmp edx, 1
jbe 0x540996
lea edi, [eax + 1]
cmp edi, 0xfffffffe
ja 0x540996
mov ecx, dword [esi + 0x14]
cmp ecx, edi
jae 0x540a20
push eax
push edi
mov ecx, esi
call fcn.004039b0
jmp 0x540a35
test edi, edi
jne 0x540a37
mov dword [esi + 0x10], edi
cmp ecx, 0x10
jb 0x540a30
mov eax, dword [esi]
jmp 0x540a32
mov eax, esi
mov byte [eax], 0
test edi, edi
setne al
test al, al
je 0x540a67
mov ecx, dword [esi + 0x10]
mov edx, 0x10
cmp dword [esi + 0x14], edx
jb 0x540a4f
mov eax, dword [esi]
jmp 0x540a51
mov eax, esi
mov byte [eax + ecx], 0x3d
mov dword [esi + 0x10], edi
cmp dword [esi + 0x14], edx
jb 0x540a61
mov eax, dword [esi]
jmp 0x540a63
mov eax, esi
mov byte [edi + eax], 0
cmp ebp, 3
jl 0x5409f8
mov eax, esi
mov ecx, dword [esp + 0x24]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1c
ret 0xc