Function at 0x512ea8
Capabilities:
Encode data using base64

Disassembly:
push ebp
mov ebp, esp
mov ecx, 5
push 0
push 0
dec ecx
jne 0x512eb0
push ecx
push ebx
push esi
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
xor eax, eax
push ebp
push 0x51324f
push dword fs:[eax]
mov dword fs:[eax], esp
mov ebx, dword [ebp - 4]
mov eax, ebx
test eax, eax
je 0x512edc
sub eax, 4
mov eax, dword [eax]
and eax, 0x80000003
jns 0x512ee8
dec eax
or eax, 0xfffffffc
inc eax
test eax, eax
je 0x512f02
mov ecx, 0x513264
mov dl, 1
mov eax, dword [0x40dd98]
call fcn.004134e4
call fcn.00404ba0
mov eax, ebx
test eax, eax
je 0x512f0d
sub eax, 4
mov eax, dword [eax]
test eax, eax
jns 0x512f14
add eax, 3
sar eax, 2
dec eax
lea edx, [eax + eax*2]
mov eax, dword [ebp - 8]
call fcn.00405968
mov eax, ebx
test eax, eax
je 0x512f2e
sub eax, 4
mov eax, dword [eax]
test eax, eax
jns 0x512f35
add eax, 3
sar eax, 2
dec eax
test eax, eax
jle 0x51300d
mov dword [ebp - 0x14], eax
mov esi, 1
mov eax, esi
dec eax
add eax, eax
add eax, eax
mov edx, dword [ebp - 4]
lea eax, [edx + eax]
lea edx, [ebp - 0xf]
mov ecx, 4
call fcn.004031d8
mov edx, 4
lea eax, [ebp - 0xf]
movzx ecx, byte [eax]
sub cl, 0x2b
je 0x512f8d
add cl, 0xfb
sub cl, 0xa
jb 0x512f92
add cl, 0xf9
sub cl, 0x1a
jb 0x512f97
add cl, 0xfa
sub cl, 0x1a
jb 0x512f9c
jmp 0x512fa1
mov byte [eax], 0x3e
jmp 0x512fa4
add byte [eax], 4
jmp 0x512fa4
sub byte [eax], 0x41
jmp 0x512fa4
sub byte [eax], 0x47
jmp 0x512fa4
mov byte [eax], 0x3f
inc eax
dec edx
jne 0x512f6b
movzx edx, byte [ebp - 0xf]
add edx, edx
add edx, edx
movzx eax, byte [ebp - 0xe]
movzx ecx, al
shr ecx, 4
and cl, 3
or dl, cl
mov byte [ebp - 0xb], dl
shl eax, 4
movzx edx, byte [ebp - 0xd]
movzx ecx, dl
shr ecx, 2
and cl, 0xf
or al, cl
mov byte [ebp - 0xa], al
shl edx, 6
movzx eax, byte [ebp - 0xc]
and al, 0x3f
or dl, al
mov byte [ebp - 9], dl
mov eax, dword [ebp - 8]
call fcn.00405738
mov edx, esi
dec edx
lea edx, [edx + edx*2]
lea edx, [eax + edx]
lea eax, [ebp - 0xb]
mov ecx, 3
call fcn.004031d8
inc esi
dec dword [ebp - 0x14]
jne 0x512f49
mov edx, dword [ebp - 4]
mov eax, edx
test eax, eax
je 0x51301b
sub eax, 4
mov eax, dword [eax]
test eax, eax
je 0x513234
mov eax, edx
test eax, eax
je 0x51302e
sub eax, 4
mov eax, dword [eax]
mov edx, dword [ebp - 4]
lea eax, [edx + eax - 4]
lea edx, [ebp - 0xf]
mov ecx, 4
call fcn.004031d8
cmp byte [ebp - 0xd], 0x3d
jne 0x5130c3
mov edx, 2
lea eax, [ebp - 0xf]
movzx ecx, byte [eax]
sub cl, 0x2b
je 0x513072
add cl, 0xfb
sub cl, 0xa
jb 0x513077
add cl, 0xf9
sub cl, 0x1a
jb 0x51307c
add cl, 0xfa
sub cl, 0x1a
jb 0x513081
jmp 0x513086
mov byte [eax], 0x3e
jmp 0x513089
add byte [eax], 4
jmp 0x513089
sub byte [eax], 0x41
jmp 0x513089
sub byte [eax], 0x47
jmp 0x513089
mov byte [eax], 0x3f
inc eax
dec edx
jne 0x513050
movzx eax, byte [ebp - 0xf]
add eax, eax
add eax, eax
movzx edx, byte [ebp - 0xe]
shr edx, 4
and dl, 3
or al, dl
mov byte [ebp - 0xb], al
lea eax, [ebp - 0x18]
movzx edx, byte [ebp - 0xb]
call fcn.00405430
mov edx, dword [ebp - 0x18]
mov eax, dword [ebp - 8]
call fcn.00405514
mov eax, dword [ebp - 8]
jmp 0x513234
cmp byte [ebp - 0xc], 0x3d
jne 0x513173
mov edx, 3
lea eax, [ebp - 0xf]
movzx ecx, byte [eax]
sub cl, 0x2b
je 0x5130f7
add cl, 0xfb
sub cl, 0xa
jb 0x5130fc
add cl, 0xf9
sub cl, 0x1a
jb 0x513101
add cl, 0xfa
sub cl, 0x1a
jb 0x513106
jmp 0x51310b
mov byte [eax], 0x3e
jmp 0x51310e
add byte [eax], 4
jmp 0x51310e
sub byte [eax], 0x41
jmp 0x51310e
sub byte [eax], 0x47
jmp 0x51310e
mov byte [eax], 0x3f
inc eax
dec edx
jne 0x5130d5
movzx edx, byte [ebp - 0xf]
add edx, edx
add edx, edx
movzx eax, byte [ebp - 0xe]
movzx ecx, al
shr ecx, 4
and cl, 3
or dl, cl
mov byte [ebp - 0xb], dl
shl eax, 4
movzx edx, byte [ebp - 0xd]
shr edx, 2
and dl, 0xf
or al, dl
mov byte [ebp - 0xa], al
mov eax, dword [ebp - 8]
push dword [eax]
lea eax, [ebp - 0x1c]
movzx edx, byte [ebp - 0xb]
call fcn.00405430
push dword [ebp - 0x1c]
lea eax, [ebp - 0x20]
movzx edx, byte [ebp - 0xa]
call fcn.00405430
push dword [ebp - 0x20]
mov eax, dword [ebp - 8]
mov edx, 3
call fcn.004055dc
jmp 0x513234
mov edx, 4
lea eax, [ebp - 0xf]
movzx ecx, byte [eax]
sub cl, 0x2b
je 0x51319d
add cl, 0xfb
sub cl, 0xa
jb 0x5131a2
add cl, 0xf9
sub cl, 0x1a
jb 0x5131a7
add cl, 0xfa
sub cl, 0x1a
jb 0x5131ac
jmp 0x5131b1
mov byte [eax], 0x3e
jmp 0x5131b4
add byte [eax], 4
jmp 0x5131b4
sub byte [eax], 0x41
jmp 0x5131b4
sub byte [eax], 0x47
jmp 0x5131b4
mov byte [eax], 0x3f
inc eax
dec edx
jne 0x51317b
movzx edx, byte [ebp - 0xf]
add edx, edx
add edx, edx
movzx eax, byte [ebp - 0xe]
movzx ecx, al
shr ecx, 4
and cl, 3
or dl, cl
mov byte [ebp - 0xb], dl
shl eax, 4
movzx edx, byte [ebp - 0xd]
movzx ecx, dl
shr ecx, 2
and cl, 0xf
or al, cl
mov byte [ebp - 0xa], al
shl edx, 6
movzx eax, byte [ebp - 0xc]
and al, 0x3f
or dl, al
mov byte [ebp - 9], dl
mov eax, dword [ebp - 8]
push dword [eax]
lea eax, [ebp - 0x24]
movzx edx, byte [ebp - 0xb]
call fcn.00405430
push dword [ebp - 0x24]
lea eax, [ebp - 0x28]
movzx edx, byte [ebp - 0xa]
call fcn.00405430
push dword [ebp - 0x28]
lea eax, [ebp - 0x2c]
movzx edx, byte [ebp - 9]
call fcn.00405430
push dword [ebp - 0x2c]
mov eax, dword [ebp - 8]
mov edx, 4
call fcn.004055dc
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x513256
lea eax, [ebp - 0x2c]
mov edx, 6
call fcn.0040526c
ret