Function at 0x5083ac
Capabilities:
Encode data using base64

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov esi, edx
mov ebx, ecx
mov edx, edi
mov dword [ebp - 0x18], ebx
call fcn.00508244
mov dword [ebp - 0x24], eax
test edi, edi
jne 0x5083dd
mov ecx, esi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x5083d2
sub ecx, edx
mov edi, ecx
and dword [ebp - 0x1c], 0
lea ecx, [edi + esi]
and dword [ebp - 0xc], 0
mov eax, esi
mov dword [ebp - 8], ecx
mov dword [ebp - 4], esi
cmp eax, ecx
jae 0x508449
mov edi, eax
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x14], eax
mov ebx, eax
movsx eax, byte [esi]
sub eax, 9
je 0x508422
sub eax, 1
je 0x508422
dec eax
sub eax, 1
je 0x508422
sub eax, 1
je 0x508422
sub eax, 0x13
je 0x508422
mov eax, dword [ebp - 0x10]
xor edx, edx
jmp 0x50842a
mov eax, dword [ebp - 0x14]
xor edx, edx
inc edx
mov edi, ebx
test edx, edx
je 0x508444
lea esi, [edi + 1]
mov dword [ebp - 4], esi
mov edi, esi
mov dword [ebp - 0x10], esi
mov ebx, esi
mov dword [ebp - 0x14], esi
mov eax, esi
cmp esi, ecx
jb 0x5083fe
mov ebx, dword [ebp - 0x18]
cmp eax, ecx
jbe 0x50847b
movsx eax, byte [ecx]
sub eax, 9
je 0x50846c
sub eax, 1
je 0x50846c
dec eax
sub eax, 1
je 0x50846c
sub eax, 1
je 0x50846c
sub eax, 0x13
je 0x50846c
xor eax, eax
jmp 0x50846f
xor eax, eax
inc eax
test eax, eax
je 0x50847b
dec ecx
mov dword [ebp - 8], ecx
cmp esi, ecx
ja 0x50844b
mov eax, ecx
sub eax, esi
je 0x50849a
test al, 3
jne 0x50849a
lea eax, [ecx - 1]
cmp byte [eax], 0x3d
cmove ecx, eax
lea eax, [ecx - 1]
cmp byte [eax], 0x3d
cmove ecx, eax
mov dword [ebp - 8], ecx
sub ecx, esi
and cl, 3
cmp cl, 1
je 0x5085f2
mov ecx, ebx
call fcn.004f703f
push 0
push eax
call fcn.00724770
mov ebx, dword [ebp - 0x24]
mov edi, dword [ebp - 0x18]
pop ecx
pop ecx
test eax, eax
jne 0x5085e0
mov eax, dword [edi + 0x20]
cmp dword [eax + 0x40], 0
jne 0x5085e0
mov esi, dword [ebp - 0x1c]
mov edx, dword [ebp - 0xc]
mov ecx, dword [ebp - 4]
cmp ecx, dword [ebp - 8]
jae 0x5085b3
movsx eax, byte [ecx]
inc ecx
mov dword [ebp - 4], ecx
cmp eax, 0x41
jl 0x5084f7
cmp eax, 0x5a
jle 0x50854e
cmp eax, 0x61
jl 0x508501
cmp eax, 0x7a
jle 0x508553
cmp eax, 0x30
jl 0x50850b
cmp eax, 0x39
jle 0x508558
cmp eax, 0x2b
je 0x508561
cmp eax, 0x2f
je 0x50855d
mov ecx, eax
sub ecx, 9
je 0x508535
sub ecx, 1
je 0x508535
dec ecx
sub ecx, 1
je 0x508535
sub ecx, 1
je 0x508535
sub ecx, 0x13
je 0x508535
xor ecx, ecx
jmp 0x508538
xor ecx, ecx
inc ecx
test ecx, ecx
jne 0x5084da
cmp eax, 0x3d
je 0x5084da
push str.invalid_character_in_base64
push 2
push edi
jmp 0x5085fa
sub eax, 0x41
jmp 0x508564
sub eax, 0x47
jmp 0x508564
add eax, 4
jmp 0x508564
push 0x3f
jmp 0x508563
push 0x3e
pop eax
and eax, 0x3f
shl esi, 6
add edx, 6
or esi, eax
mov dword [ebp - 0x1c], esi
mov dword [ebp - 0xc], edx
cmp edx, 0x18
jne 0x5084dd
mov eax, esi
mov edx, ebx
shr eax, 0x10
mov ecx, edi
push eax
call fcn.005087ff
mov eax, esi
mov edx, ebx
pop ecx
shr eax, 8
mov ecx, edi
push eax
call fcn.005087ff
pop ecx
push esi
mov edx, ebx
mov ecx, edi
call fcn.005087ff
xor edx, edx
pop ecx
mov dword [ebp - 0xc], edx
jmp 0x5084da
cmp edx, 0x12
jne 0x5085cd
mov eax, esi
mov edx, ebx
shr eax, 0xa
mov ecx, edi
push eax
call fcn.005087ff
pop ecx
shr esi, 2
jmp 0x5085d5
cmp edx, 0xc
jne 0x5085e0
shr esi, 4
push esi
mov edx, ebx
mov ecx, edi
call fcn.005087ff
pop ecx
mov ecx, edi
call fcn.004f70d4
test eax, eax
jne 0x5085ff
pop edi
pop esi
mov eax, ebx
pop ebx
leave
ret
push str.invalid_number_of_characters_in_base64
push 2
push ebx
call fcn.004f715e
mov edx, ebx
call fcn.0050860e
mov ecx, edi
call fcn.004f7175
int3