Function at 0x5128a0
Capabilities:
Encode data using base64

Disassembly:
push 0xffffffffffffffff
push 0x596669
mov eax, dword fs:[0]
push eax
sub esp, 0x1c
push ebx
push ebp
push esi
push edi
mov eax, dword [0x5e173c]
xor eax, esp
push eax
lea eax, [esp + 0x30]
mov dword fs:[0], eax
mov edi, ecx
mov dword [esp + 0x38], 0
mov dword [esp + 0x24], 0
mov dword [edi + 0x14], 0xf
mov dword [edi + 0x10], 0
mov dword [esp + 0x2c], edi
mov byte [edi], 0
mov dword [esp + 0x38], 0
xor ebx, ebx
mov ebp, dword [esp + 0x40]
mov dword [esp + 0x24], 1
test ebp, ebp
je 0x512bc9
lea esp, [esp]
mov al, byte [edx]
dec ebp
mov byte [esp + ebx + 0x18], al
inc edx
mov ah, byte [esp + 0x1a]
inc ebx
mov ch, byte [esp + 0x19]
mov cl, byte [esp + 0x18]
mov dword [esp + 0x28], edx
mov byte [esp + 0x17], ah
mov byte [esp + 0x23], ch
mov byte [esp + 0x21], cl
cmp ebx, 3
jne 0x512a2b
mov al, cl
and cl, 3
shr al, 2
mov byte [esp + 0x1c], al
mov al, ch
shl cl, 4
shr al, 4
add cl, al
mov al, ah
mov byte [esp + 0x1d], cl
mov cl, ch
and cl, 0xf
shr al, 6
shl cl, 2
add cl, al
mov al, ah
and al, 0x3f
mov byte [esp + 0x1e], cl
mov byte [esp + 0x1f], al
xor ebx, ebx
jmp 0x512980
cmp dword [0x5e40d0], 0x10
mov ecx, 0x5e40bc
movzx eax, byte [esp + ebx + 0x1c]
cmovae ecx, dword [0x5e40bc]
mov dl, byte [eax + ecx]
or eax, 0xffffffff
mov ecx, dword [edi + 0x10]
sub eax, ecx
mov byte [esp + 0x22], dl
cmp eax, 1
jbe 0x512a60
lea esi, [ecx + 1]
cmp esi, 0xfffffffe
ja 0x512a60
mov eax, dword [edi + 0x14]
cmp eax, esi
jae 0x5129e1
push ecx
push esi
mov ecx, edi
call fcn.00404c90
mov dl, byte [esp + 0x22]
test esi, esi
je 0x512a13
cmp dword [edi + 0x14], 0x10
mov ecx, dword [edi + 0x10]
jb 0x5129fb
mov eax, dword [edi]
jmp 0x5129fd
test esi, esi
jne 0x5129d4
mov dword [edi + 0x10], esi
cmp eax, 0x10
jb 0x5129f4
mov eax, dword [edi]
mov byte [eax], 0
jmp 0x512a13
mov eax, edi
mov byte [eax], 0
jmp 0x512a13
mov eax, edi
mov byte [eax + ecx], dl
cmp dword [edi + 0x14], 0x10
mov dword [edi + 0x10], esi
jb 0x512a0d
mov eax, dword [edi]
jmp 0x512a0f
mov eax, edi
mov byte [eax + esi], 0
inc ebx
cmp ebx, 4
jl 0x512980
mov edx, dword [esp + 0x28]
xor ebx, ebx
mov ch, byte [esp + 0x23]
mov cl, byte [esp + 0x21]
test ebp, ebp
jne 0x512910
test ebx, ebx
je 0x512bc9
mov eax, ebx
cmp ebx, 3
jge 0x512a6f
cmp eax, 3
jae 0x512a6a
mov byte [esp + eax + 0x18], 0
inc eax
cmp eax, 3
jl 0x512a45
mov dl, byte [esp + 0x1a]
mov ch, byte [esp + 0x19]
mov cl, byte [esp + 0x18]
jmp 0x512a73
push 0x5a8470
call fcn.00560df3
call fcn.0056582e
mov dl, byte [esp + 0x17]
mov al, cl
xor ebp, ebp
shr al, 2
and cl, 3
mov byte [esp + 0x1c], al
mov al, ch
shr al, 4
and ch, 0xf
shl cl, 4
add cl, al
shl ch, 2
mov al, dl
mov byte [esp + 0x1d], cl
shr al, 6
and dl, 0x3f
add ch, al
mov byte [esp + 0x1f], dl
lea eax, [ebx + 1]
mov byte [esp + 0x1e], ch
test eax, eax
jle 0x512b4d
cmp dword [0x5e40d0], 0x10
mov ecx, 0x5e40bc
movzx eax, byte [esp + ebp + 0x1c]
cmovae ecx, dword [0x5e40bc]
mov dl, byte [eax + ecx]
or eax, 0xffffffff
mov ecx, dword [edi + 0x10]
sub eax, ecx
mov byte [esp + 0x17], dl
cmp eax, 1
jbe 0x512a60
lea esi, [ecx + 1]
cmp esi, 0xfffffffe
ja 0x512a60
mov eax, dword [edi + 0x14]
cmp eax, esi
jae 0x512b0f
push ecx
push esi
mov ecx, edi
call fcn.00404c90
mov dl, byte [esp + 0x17]
test esi, esi
je 0x512b41
cmp dword [edi + 0x14], 0x10
mov ecx, dword [edi + 0x10]
jb 0x512b29
mov eax, dword [edi]
jmp 0x512b2b
test esi, esi
jne 0x512b02
mov dword [edi + 0x10], esi
cmp eax, 0x10
jb 0x512b22
mov eax, dword [edi]
mov byte [eax], 0
jmp 0x512b41
mov eax, edi
mov byte [eax], 0
jmp 0x512b41
mov eax, edi
mov byte [eax + ecx], dl
cmp dword [edi + 0x14], 0x10
mov dword [edi + 0x10], esi
jb 0x512b3b
mov eax, dword [edi]
jmp 0x512b3d
mov eax, edi
mov byte [eax + esi], 0
inc ebp
lea eax, [ebx + 1]
cmp ebp, eax
jl 0x512ab2
cmp ebx, 3
jge 0x512bc9
mov ecx, dword [edi + 0x10]
or eax, 0xffffffff
sub eax, ecx
inc ebx
cmp eax, 1
jbe 0x512a60
lea esi, [ecx + 1]
cmp esi, 0xfffffffe
ja 0x512a60
mov eax, dword [edi + 0x14]
cmp eax, esi
jae 0x512b91
push ecx
push esi
mov ecx, edi
call fcn.00404c90
test esi, esi
je 0x512bc4
cmp dword [edi + 0x14], 0x10
mov ecx, dword [edi + 0x10]
jb 0x512bab
mov eax, dword [edi]
jmp 0x512bad
test esi, esi
jne 0x512b84
mov dword [edi + 0x10], esi
cmp eax, 0x10
jb 0x512ba4
mov eax, dword [edi]
mov byte [eax], 0
jmp 0x512bc4
mov eax, edi
mov byte [eax], 0
jmp 0x512bc4
mov eax, edi
mov byte [ecx + eax], 0x3d
cmp dword [edi + 0x14], 0x10
mov dword [edi + 0x10], esi
jb 0x512bbe
mov eax, dword [edi]
jmp 0x512bc0
mov eax, edi
mov byte [esi + eax], 0
cmp ebx, 3
jl 0x512b52
mov eax, edi
mov ecx, dword [esp + 0x30]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x28
ret