Function at 0x594530
Capabilities:
Encode data using base64

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push esi
push edi
push 1
call fcn.00597a71
add esp, 4
mov dword [ebp - 0x20], eax
xor edi, edi
mov dword [ebp - 8], edi
call fcn.005917e0
mov esi, eax
mov dword [ebp - 0x1c], esi
test esi, esi
je 0x594849
mov ecx, esi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x594561
sub ecx, edx
mov eax, ecx
shr eax, 2
push ebx
lea ebx, [eax + eax*2]
test ecx, ecx
je 0x594583
dec ecx
cmp byte [ecx + esi], 0x3d
jne 0x594583
dec ebx
test ecx, ecx
jne 0x594577
push ebx
call fcn.00597aaf
push ebx
mov edx, eax
mov dword [ebp - 0xc], eax
mov ecx, esi
call fcn.00593e60
add esp, 8
test al, al
je 0x5945c0
push ebx
call fcn.00597aaf
mov edx, dword [ebp - 0xc]
lea ecx, [ebx - 5]
mov edi, eax
mov dword [ebp - 8], eax
add esp, 4
add ebx, 0xfffffffb
lea esi, [edx + 5]
rep movsb byte es:[edi], byte [esi]
mov esi, dword [ebp - 0x1c]
mov edi, eax
jmp 0x5945c5
mov edx, dword [ebp - 0xc]
xor ebx, ebx
push edx
call fcn.00597a6c
push esi
call fcn.00597a6c
add esp, 8
test edi, edi
je 0x594848
lea eax, [ebp - 0xc]
mov dword [ebp - 0xc], 0
push eax
push ebx
push edi
call fcn.00591d10
mov dword [ebp - 0x1c], eax
mov ecx, edi
test eax, eax
je 0x59483f
mov ebx, dword [ebp - 0xc]
test ebx, ebx
je 0x594725
mov ecx, ebx
mov eax, 0xaaaaaaab
mov esi, ecx
mul esi
mov eax, esi
shr edx, 1
lea edx, [edx + edx*2]
sub eax, edx
je 0x59461f
lea ecx, [edx + 3]
mov eax, 0xaaaaaaab
mul ecx
shr edx, 1
lea esi, [edx*4]
call dword [0x41b00c]
lea ecx, [esi + 0x100]
push ecx
push 8
push eax
call dword [0x41b044]
mov ecx, ebx
mov dword [ebp - 4], eax
mov dword [ebp - 0xc], edi
mov byte [eax + esi], 0
test ecx, ecx
je 0x59472f
mov edx, dword [ebp - 0x1c]
lea esi, [eax + 2]
or eax, 0xffffffff
mov dword [ebp - 0x14], esi
sub eax, edx
dec ecx
mov dword [ebp - 0x10], eax
mov eax, 0xaaaaaaab
lea edi, [edx + 2]
mul ecx
mov eax, edx
mov edx, 2
shr eax, 1
inc eax
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 8]
mov dword [ebp - 0xc], eax
nop dword [eax + eax]
mov eax, dword [ebp - 0x10]
movzx ecx, byte [edi - 2]
add eax, edi
shl ecx, 8
cmp eax, ebx
jae 0x5946a8
movzx eax, byte [edi - 1]
or eax, ecx
jmp 0x5946aa
mov eax, ecx
shl eax, 8
cmp edx, ebx
jae 0x5946b8
movzx ecx, byte [edi]
or ecx, eax
jmp 0x5946ba
mov ecx, eax
mov eax, ecx
shr eax, 0x12
mov al, byte [eax + 0x420ae0]
mov byte [esi - 2], al
mov eax, ecx
shr eax, 0xc
and eax, 0x3f
mov al, byte [eax + 0x420ae0]
mov byte [esi - 1], al
mov eax, dword [ebp - 0x10]
add eax, edi
cmp eax, ebx
jae 0x5946f2
mov eax, ecx
shr eax, 6
and eax, 0x3f
mov al, byte [eax + 0x420ae0]
jmp 0x5946f4
mov al, 0x3d
mov esi, dword [ebp - 0x14]
mov byte [esi], al
cmp edx, ebx
jae 0x594708
and ecx, 0x3f
mov al, byte [ecx + 0x420ae0]
jmp 0x59470a
mov al, 0x3d
mov byte [esi + 1], al
add edi, 3
add esi, 4
add edx, 3
sub dword [ebp - 0x18], 1
mov dword [ebp - 0x14], esi
jne 0x594690
jmp 0x59472f
mov dword [ebp - 4], 0
mov dword [ebp - 0xc], edi
push 0xff
call fcn.00597aaf
add esp, 4
mov dword [ebp - 8], 0
mov edi, eax
lea eax, [ebp - 8]
push eax
push 0
push 0
push 0x41b200
call dword [0x41b164]
test eax, eax
js 0x59478d
push 0xff
push dword [ebp - 8]
push edi
call fcn.0059ce99
add esp, 0xc
mov esi, eax
push dword [ebp - 8]
call dword [0x41b034]
cmp esi, eax
jne 0x59478d
lea ecx, [esi + 1]
cmp ecx, 0xff
jae 0x59478d
mov word [eax + edi], 0x5c
push 0x400
call fcn.00597aaf
add esp, 4
mov ebx, eax
push edi
push ebx
call dword [0x41b008]
call fcn.00596b60
push 0xff
mov esi, eax
call fcn.00597aaf
add esp, 4
mov dword [ebp - 0x18], eax
mov ecx, esi
push 0xff
push eax
push 9
call fcn.00591260
push dword [ebp - 0x18]
push ebx
call dword [0x41b024]
push dword [ebp - 4]
call dword [0x41b06c]
push 0
push 0
push 2
push 0
push 0
push 0x40000000
push ebx
mov dword [ebp - 0x14], eax
call dword [0x41b014]
mov esi, eax
cmp esi, 0xffffffff
je 0x594815
push 0
push 0
push dword [ebp - 0x14]
push dword [ebp - 4]
push esi
call dword [0x41b028]
push esi
call dword [0x41b018]
push dword [ebp - 0x18]
call fcn.00597a6c
push ebx
call fcn.00597a6c
push edi
call fcn.00597a6c
push dword [ebp - 4]
call fcn.00597a6c
push dword [ebp - 0x1c]
call fcn.00597a6c
mov ecx, dword [ebp - 0xc]
add esp, 0x14
push ecx
call fcn.00597a6c
add esp, 4
pop ebx
push 1
push dword [ebp - 0x20]
call fcn.00597aa1
add esp, 8
pop edi
pop esi
mov esp, ebp
pop ebp
ret