Function at 0x401270
Capabilities:
Encode data using base64

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4058a9
mov eax, dword fs:[0]
push eax
sub esp, 0x2c
push ebx
push esi
push edi
mov eax, dword [0x407018]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, dword [ebp + 0x10]
mov edi, dword [ebp + 8]
lea edx, [ebx + 2]
mov eax, 0xaaaaaaab
mul edx
shr edx, 1
add edx, edx
mov al, cl
add edx, edx
neg al
sbb al, al
and al, 0xf1
add al, 0x3d
mov dword [ebp - 0x1c], 0
movzx ecx, cl
mov byte [ebp - 0x18], al
mov eax, dword [ecx*4 + 0x407314]
mov dword [ebp - 0x14], eax
xor eax, eax
mov dword [edi + 0x14], 0xf
mov dword [edi + 0x10], eax
mov byte [edi], al
mov dword [ebp - 4], eax
mov esi, dword [edi + 0x10]
mov dword [ebp - 0x1c], 1
cmp esi, edx
ja 0x401314
cmp dword [edi + 0x14], edx
je 0x401314
push 1
push edx
mov eax, edi
call fcn.004015d0
test al, al
je 0x401314
cmp dword [edi + 0x14], 0x10
mov dword [edi + 0x10], esi
jb 0x40130e
mov eax, dword [edi]
jmp 0x401310
mov eax, edi
mov byte [eax + esi], 0
mov dword [ebp - 0x10], 0
test ebx, ebx
je 0x40158a
mov eax, 2
sub eax, dword [ebp + 0xc]
mov dword [ebp - 0x24], eax
mov esi, dword [ebp - 0x10]
add esi, dword [ebp + 0xc]
mov ecx, dword [ebp - 0x14]
movzx eax, byte [esi]
shr eax, 2
mov dl, byte [eax + ecx]
mov ecx, dword [edi + 0x14]
mov byte [ebp - 0x20], dl
cmp ecx, 0x10
jb 0x40134f
mov edx, dword [edi]
jmp 0x401351
mov edx, edi
mov eax, dword [edi + 0x10]
add eax, edx
cmp ecx, 0x10
jb 0x40135f
mov ecx, dword [edi]
jmp 0x401361
mov ecx, edi
test eax, eax
je 0x401367
sub eax, ecx
mov ecx, dword [ebp - 0x20]
push ecx
call fcn.00401680
mov ebx, dword [ebp - 0x24]
add ebx, esi
lea eax, [ebx - 1]
cmp eax, dword [ebp + 0x10]
jae 0x4014e3
movzx ecx, byte [esi]
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp - 0x10]
movzx edx, byte [edx + eax + 1]
and ecx, 3
shl ecx, 4
add ecx, dword [ebp - 0x14]
shr edx, 4
mov al, byte [edx + ecx]
mov ecx, dword [edi + 0x14]
mov byte [ebp - 0x28], al
cmp ecx, 0x10
jb 0x4013ad
mov edx, dword [edi]
jmp 0x4013af
mov edx, edi
mov eax, dword [edi + 0x10]
add eax, edx
cmp ecx, 0x10
jb 0x4013bd
mov ecx, dword [edi]
jmp 0x4013bf
mov ecx, edi
test eax, eax
je 0x4013c5
sub eax, ecx
mov ecx, dword [ebp - 0x28]
push ecx
call fcn.00401680
mov eax, dword [ebp - 0x10]
cmp ebx, dword [ebp + 0x10]
jae 0x40146c
mov esi, dword [ebp + 0xc]
movzx edx, byte [eax + esi + 1]
movzx eax, byte [eax + esi + 2]
mov ebx, dword [ebp - 0x14]
shr eax, 6
and edx, 0xf
add eax, ebx
mov cl, byte [eax + edx*4]
mov byte [ebp - 0x2c], cl
mov ecx, dword [edi + 0x14]
cmp ecx, 0x10
jb 0x401404
mov edx, dword [edi]
jmp 0x401406
mov edx, edi
mov eax, dword [edi + 0x10]
add eax, edx
cmp ecx, 0x10
jb 0x401414
mov ecx, dword [edi]
jmp 0x401416
mov ecx, edi
test eax, eax
je 0x40141c
sub eax, ecx
mov edx, dword [ebp - 0x2c]
push edx
call fcn.00401680
mov eax, dword [ebp - 0x10]
movzx ecx, byte [eax + esi + 2]
and ecx, 0x3f
mov dl, byte [ecx + ebx]
mov ecx, dword [edi + 0x14]
mov byte [ebp - 0x30], dl
cmp ecx, 0x10
jb 0x401442
mov edx, dword [edi]
jmp 0x401444
mov edx, edi
mov eax, dword [edi + 0x10]
add eax, edx
cmp ecx, 0x10
jb 0x401452
mov ecx, dword [edi]
jmp 0x401454
mov ecx, edi
test eax, eax
jne 0x401461
mov ecx, dword [ebp - 0x30]
push ecx
jmp 0x401573
sub eax, ecx
mov ecx, dword [ebp - 0x30]
push ecx
jmp 0x401573
mov edx, dword [ebp + 0xc]
movzx ecx, byte [eax + edx + 1]
mov edx, dword [ebp - 0x14]
and ecx, 0xf
mov al, byte [edx + ecx*4]
mov ecx, dword [edi + 0x14]
mov byte [ebp - 0x34], al
cmp ecx, 0x10
jb 0x40148c
mov edx, dword [edi]
jmp 0x40148e
mov edx, edi
mov eax, dword [edi + 0x10]
add eax, edx
cmp ecx, 0x10
jb 0x40149c
mov ecx, dword [edi]
jmp 0x40149e
mov ecx, edi
test eax, eax
je 0x4014a4
sub eax, ecx
mov ecx, dword [ebp - 0x34]
push ecx
call fcn.00401680
mov ecx, dword [edi + 0x14]
cmp ecx, 0x10
jb 0x4014b9
mov edx, dword [edi]
jmp 0x4014bb
mov edx, edi
mov eax, dword [edi + 0x10]
add eax, edx
cmp ecx, 0x10
jb 0x4014c9
mov ecx, dword [edi]
jmp 0x4014cb
mov ecx, edi
test eax, eax
jne 0x4014d8
mov edx, dword [ebp - 0x18]
push edx
jmp 0x401573
mov edx, dword [ebp - 0x18]
sub eax, ecx
push edx
jmp 0x401573
movzx eax, byte [esi]
mov ecx, dword [ebp - 0x14]
and eax, 3
add eax, eax
mov dl, byte [ecx + eax*8]
mov ecx, dword [edi + 0x14]
mov byte [ebp - 0x38], dl
cmp ecx, 0x10
jb 0x401500
mov edx, dword [edi]
jmp 0x401502
mov edx, edi
mov eax, dword [edi + 0x10]
add eax, edx
cmp ecx, 0x10
jb 0x401510
mov ecx, dword [edi]
jmp 0x401512
mov ecx, edi
test eax, eax
je 0x401518
sub eax, ecx
mov ecx, dword [ebp - 0x38]
push ecx
call fcn.00401680
mov ecx, dword [edi + 0x14]
cmp ecx, 0x10
jb 0x40152d
mov edx, dword [edi]
jmp 0x40152f
mov edx, edi
mov eax, dword [edi + 0x10]
add eax, edx
cmp ecx, 0x10
jb 0x40153d
mov ecx, dword [edi]
jmp 0x40153f
mov ecx, edi
test eax, eax
je 0x401545
sub eax, ecx
mov esi, dword [ebp - 0x18]
push esi
call fcn.00401680
mov ecx, dword [edi + 0x14]
cmp ecx, 0x10
jb 0x40155a
mov edx, dword [edi]
jmp 0x40155c
mov edx, edi
mov eax, dword [edi + 0x10]
add eax, edx
cmp ecx, 0x10
jb 0x40156a
mov ecx, dword [edi]
jmp 0x40156c
mov ecx, edi
test eax, eax
je 0x401572
sub eax, ecx
push esi
call fcn.00401680
mov eax, dword [ebp - 0x10]
add eax, 3
mov dword [ebp - 0x10], eax
cmp eax, dword [ebp + 0x10]
jb 0x40132e
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret