Function at 0x413790
Capabilities:
Encode data using base64

Disassembly:
sub esp, 8
mov edx, dword [esp + 0x10]
push ebx
mov ebx, dword [esp + 0x18]
push ebp
push esi
push edi
mov dword [ebx], 0
mov ax, word [ecx + 0x39c]
cmp ax, 2
mov ebp, edx
mov byte [esp + 0x20], 0
jne 0x41385d
mov esi, dword [esp + 0x1c]
mov al, byte [esi]
test al, al
je 0x413829
cmp al, 0x3d
jne 0x413815
mov al, byte [esi + 1]
inc esi
test al, al
je 0x413829
cmp al, 0xd
je 0x413829
cmp al, 0xa
je 0x413829
cmp al, 0x30
jl 0x4137e7
cmp al, 0x39
jg 0x4137e7
sub al, 0x30
jmp 0x4137e9
sub al, 0x37
shl al, 4
inc esi
mov cl, al
mov al, byte [esi]
test al, al
je 0x413829
cmp al, 0x30
jl 0x413809
cmp al, 0x39
jg 0x413809
movsx eax, al
sub eax, 0x30
add cl, al
mov byte [edx], cl
jmp 0x413820
movsx eax, al
sub eax, 0x37
add cl, al
mov byte [edx], cl
jmp 0x413820
cmp al, 0x5f
jne 0x41381e
mov byte [edx], 0x20
jmp 0x413820
mov byte [edx], al
mov al, byte [esi + 1]
inc edx
inc esi
test al, al
jne 0x4137c7
mov edi, 0x42e760
or ecx, 0xffffffff
xor eax, eax
mov byte [edx], 0
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edx, ecx
mov edi, ebp
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, ebp
jmp 0x4139df
cmp ax, 1
jne 0x413992
mov edi, dword [esp + 0x1c]
mov cl, byte [esp + 0x11]
xor esi, esi
mov al, byte [edi]
test al, al
je 0x41392b
inc edi
cmp al, 0x41
jl 0x413888
cmp al, 0x5a
jg 0x413888
add al, 0xbf
jmp 0x4138c1
cmp al, 0x61
jl 0x413894
cmp al, 0x7a
jg 0x413894
add al, 0xb9
jmp 0x4138c1
cmp al, 0x30
jl 0x4138a0
cmp al, 0x39
jg 0x4138a0
add al, 4
jmp 0x4138c1
cmp al, 0x2f
jne 0x4138a8
mov al, 0x3f
jmp 0x4138c1
cmp al, 0x2b
jne 0x4138b0
mov al, 0x3e
jmp 0x4138c1
cmp al, 0x3d
jne 0x4138b8
or al, 0xff
jmp 0x4138c1
cmp al, 0x2d
jne 0x4138c1
mov byte [esp + 0x20], 1
test al, al
jl 0x413921
mov byte [esp + esi + 0x10], al
inc esi
cmp esi, 4
jne 0x41391d
mov cl, byte [esp + 0x11]
mov al, byte [esp + 0x10]
mov bl, cl
sar bl, 4
shl al, 2
and bl, 3
or al, bl
mov bl, byte [esp + 0x12]
mov byte [edx], al
mov al, cl
sar bl, 2
shl al, 4
and bl, 0xf
inc edx
or al, bl
mov bl, byte [esp + 0x13]
mov byte [edx], al
mov al, byte [esp + 0x12]
shl al, 6
and bl, 0x3f
inc edx
or al, bl
mov byte [edx], al
mov eax, dword [esp + 0x24]
inc edx
mov esi, dword [eax]
add esi, 3
mov dword [eax], esi
xor esi, esi
jmp 0x413921
mov cl, byte [esp + 0x11]
mov al, byte [edi]
test al, al
jne 0x41387b
cmp esi, 2
jne 0x41394f
mov al, byte [esp + 0x10]
mov bl, cl
sar bl, 4
shl al, 2
and bl, 3
or al, bl
mov byte [edx], al
mov eax, dword [esp + 0x24]
inc edx
add eax, 4
mov dword [esp + 0x24], eax
cmp esi, 3
jne 0x413980
mov al, byte [esp + 0x10]
mov bl, cl
sar bl, 4
shl al, 2
and bl, 3
or al, bl
mov byte [edx], al
mov al, byte [esp + 0x12]
sar al, 2
shl cl, 4
and al, 0xf
inc edx
or cl, al
mov eax, dword [esp + 0x24]
mov byte [edx], cl
inc edx
add dword [eax], 2
mov byte [edx], 0
movsx eax, byte [esp + 0x20]
pop edi
pop esi
pop ebp
pop ebx
add esp, 8
ret 0xc
mov edi, dword [esp + 0x1c]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, 0x42e760
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebp, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebp
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, edx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
pop edi
pop esi
mov dword [ebx], ecx
pop ebp
pop ebx
add esp, 8
ret 0xc