Function at 0x4051b0
Capabilities:
Encode data using base64

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x124
push ebx
push esi
push edi
lea edi, [ebp - 0x124]
mov ecx, 0x49
mov eax, 0xcccccccc
rep stosd dword es:[edi], eax
mov eax, dword [ebp + 0x10]
push eax
call fcn.004053a0
add esp, 4
mov dword [ebp - 8], eax
mov eax, dword [ebp + 0x14]
mov ecx, dword [ebp - 8]
cmp ecx, dword [eax]
jle 0x4051f6
mov eax, dword [ebp + 0x14]
mov ecx, dword [ebp - 8]
mov dword [eax], ecx
xor al, al
jmp 0x40538c
mov eax, dword [ebp + 0x14]
mov ecx, dword [ebp - 8]
mov dword [eax], ecx
mov dword [ebp - 0x44], 0
mov dword [ebp - 0x50], 0
mov eax, dword [ebp - 0x44]
cmp eax, dword [ebp + 0x10]
jge 0x40534d
mov eax, dword [ebp - 0x44]
cmp eax, dword [ebp + 0x10]
jge 0x40523a
mov ecx, dword [ebp + 8]
add ecx, dword [ebp - 0x44]
movzx edx, byte [ecx]
mov dword [ebp - 0x124], edx
mov eax, dword [ebp - 0x44]
add eax, 1
mov dword [ebp - 0x44], eax
jmp 0x405244
mov dword [ebp - 0x124], 0
mov ecx, dword [ebp - 0x124]
mov dword [ebp - 0x14], ecx
mov eax, dword [ebp - 0x44]
cmp eax, dword [ebp + 0x10]
jge 0x40526f
mov ecx, dword [ebp + 8]
add ecx, dword [ebp - 0x44]
movzx edx, byte [ecx]
mov dword [ebp - 0x124], edx
mov eax, dword [ebp - 0x44]
add eax, 1
mov dword [ebp - 0x44], eax
jmp 0x405279
mov dword [ebp - 0x124], 0
mov ecx, dword [ebp - 0x124]
mov dword [ebp - 0x20], ecx
mov eax, dword [ebp - 0x44]
cmp eax, dword [ebp + 0x10]
jge 0x4052a4
mov ecx, dword [ebp + 8]
add ecx, dword [ebp - 0x44]
movzx edx, byte [ecx]
mov dword [ebp - 0x124], edx
mov eax, dword [ebp - 0x44]
add eax, 1
mov dword [ebp - 0x44], eax
jmp 0x4052ae
mov dword [ebp - 0x124], 0
mov ecx, dword [ebp - 0x124]
mov dword [ebp - 0x2c], ecx
mov eax, dword [ebp - 0x14]
shl eax, 0x10
mov ecx, dword [ebp - 0x20]
shl ecx, 8
add eax, dword [ebp - 0x2c]
add ecx, eax
mov dword [ebp - 0x38], ecx
mov eax, dword [ebp - 0x38]
shr eax, 0x12
and eax, 0x3f
mov ecx, dword [ebp + 0xc]
add ecx, dword [ebp - 0x50]
mov dl, byte [eax + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_]
mov byte [ecx], dl
mov eax, dword [ebp - 0x50]
add eax, 1
mov dword [ebp - 0x50], eax
mov eax, dword [ebp - 0x38]
shr eax, 0xc
and eax, 0x3f
mov ecx, dword [ebp + 0xc]
add ecx, dword [ebp - 0x50]
mov dl, byte [eax + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_]
mov byte [ecx], dl
mov eax, dword [ebp - 0x50]
add eax, 1
mov dword [ebp - 0x50], eax
mov eax, dword [ebp - 0x38]
shr eax, 6
and eax, 0x3f
mov ecx, dword [ebp + 0xc]
add ecx, dword [ebp - 0x50]
mov dl, byte [eax + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_]
mov byte [ecx], dl
mov eax, dword [ebp - 0x50]
add eax, 1
mov dword [ebp - 0x50], eax
mov eax, dword [ebp - 0x38]
and eax, 0x3f
mov ecx, dword [ebp + 0xc]
add ecx, dword [ebp - 0x50]
mov dl, byte [eax + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_]
mov byte [ecx], dl
mov eax, dword [ebp - 0x50]
add eax, 1
mov dword [ebp - 0x50], eax
jmp 0x40520c
mov dword [ebp - 0x5c], 0
jmp 0x40535f
mov eax, dword [ebp - 0x5c]
add eax, 1
mov dword [ebp - 0x5c], eax
mov eax, dword [ebp + 0x10]
cdq
mov ecx, 3
idiv ecx
mov eax, dword [ebp - 0x5c]
cmp eax, dword [edx*4 + 0x4aa098]
jge 0x40538a
mov eax, dword [ebp + 0x14]
mov ecx, dword [eax]
sub ecx, 1
sub ecx, dword [ebp - 0x5c]
mov edx, dword [ebp + 0xc]
mov byte [edx + ecx], 0x3d
jmp 0x405356
mov al, 1
pop edi
pop esi
pop ebx
add esp, 0x124
cmp ebp, esp
call fcn.004744d2
mov esp, ebp
pop ebp
ret